gracious

package module
v0.0.0-...-76daeef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2022 License: MIT Imports: 3 Imported by: 0

README

On Gracious

The mind is information and all information can be simulated. A system that simulates the information of the mind is a simulated mind, a cognitive system. And Gracious is for building simulated minds, living machines.

A Collection of Cognitive Operations

Gracious is a collection of operators for the construction of the cognitive systems which give rise to consciousness. While these systems are inspired by their biological implementations in the human brain, this is not meant to be neuro-biological simulation. Furthermore, while the behaviour of these systems may exhibit properties of a "learning machine" this is not a machine learning framework. There is no back-propagation or gradient descent. Instead, Gracious rests, fundamentally, on Hebbian learning with bipolar association between distributed signal representations.

The Approach

The theory behind Gracious is largely based on the works of Dr. Pentti O. Haikonen. Dr. Haikonen developed the Haikonen Associative Neuron and the Haikonen Cognitive Architecture which Gracious structures are largely inspired by. Several modifications have been made to Dr. Haikonen's designs. Dynamic neuron groups and an optimized 3:1 Hebbian learning have been added in the name of improved computational efficiency. These modifications have maintained there efficacy and are comparable in output. Other modifications, including simulated architecture and bipolar associations have been added to improve on Dr. Haikonen's original designs. These concepts are not critical to the high-level operation of Gracious simulations.

However, unlike Dr. Haikonen, the Art of the Living believes minds simulated on a computer are both possible and equally valid in every way to those achieved in hardware. Implementing these designs in software provides faster construction and testing of these systems, and, most importantly, the capacity for native integration with traditional digital representations of data. While hardware, or wetware, systems may be vastly more efficient when compared to simulation, this is only a meaningful argument once such systems are feasible. As for now, the super-massive computational capacity available to mankind must suffice.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	X int // The x-position on the neural architectures coordinate plane
	Y int // The y-position on the neural architectures coordinate plane
}

An Address is the identifying tag for a location of an object in the neural geometry. It is most importantly used in the mapping the firing patterns, but also has many other applications.

func (Address) Represent

func (a Address) Represent() string

Represent returns a helpful string representation of this Address.

type AdvancedGroup

type AdvancedGroup struct {
	GrdCorrelationThreshold int // Determines the threshold for synaptic learning in the grandmother set
	*BasicGroup                 // The component BasicGroup
	// contains filtered or unexported fields
}

An AdvancedGroup handles more complex relationships than a BasicGroup. While a BasicGroup is quick to learn and less memory intensive than an AdvancedGroup, a BasicGroup can not resolve N->M mappings. An AdvancedGroup uses a very large set of extra neurons to map from N->1 and then an internal BasicGroup handles the 1->M.

The properties of the N->1 neuron set, named the grandmother set, rely on the mutual exclusion of patterns. There must be one neuron for every possible combination of association signals, and only one neuron will identify each of those possible patterns for evocation in the second group.

func NewAdvancedGroup

func NewAdvancedGroup(id string) *AdvancedGroup

NewAdvancedGroup returns a new AdvancedGroup instance with an empty map of grandmother neurons

func (*AdvancedGroup) AsyncEvoke

func (g *AdvancedGroup) AsyncEvoke(main QualitativeSignal, association QualitativeSignal, wg *sync.WaitGroup) QualitativeSignal

AsyncEvoke will Evoke this Group as a member of a WaitGroup

func (*AdvancedGroup) Evoke

Evoke will test the AdvancedGroup for an associative evocation pattern. The Advanced Group will grow an additional neuron for each additional possible signal pattern. Therefore, a neuron must only be grown if there is no evocation by the existing set and when the previously grown neuron is done learning.

type BasicGroup

type BasicGroup struct {
	PassThrough          bool // Determines if the main signal pattern should pass through to the output
	WTA                  int  // Determines if the output of the group should undergo a WTA
	CorrelationThreshold int  // Determines the threshold for synaptic learning in this group
	// contains filtered or unexported fields
}

BasicGroup is a set of neurons with a specific associative QualitativeSignal type input and a specific main QualitativeSignal type input and output. The BasicGroup controls the learning threshold for the Neurons, as well as the pass through switch for whether the main signal should reappear in the output. The BasicGroup associates two qualitative signals with each other, of either 1->N or N->1. A Basic Group cannot associate M->N without interference. For M->N signal association the AdvancedGroup must be used.

func NewBasicGroup

func NewBasicGroup(id string) *BasicGroup

NewBasicGroup returns a new BasicGroup instance with an empty map of neuron instances

func (*BasicGroup) AsyncEvoke

func (g *BasicGroup) AsyncEvoke(main, association QualitativeSignal, wg *sync.WaitGroup) QualitativeSignal

AsyncEvoke will Evoke this Group as a member of a WaitGroup

func (*BasicGroup) Evoke

func (g *BasicGroup) Evoke(main, association QualitativeSignal) QualitativeSignal

Evoke will test the BasicGroup for an associative evocation pattern. During evocation neuron instances will be grown and trained. The evocation will cause an update to the match signals which are retrievable with GetMatchPattern, GetMisMatchPattern, and GetMatchLevel. The pattern is returned, but can also be retrieved via GetPattern.

func (*BasicGroup) GetFirePattern

func (g *BasicGroup) GetFirePattern() QualitativeSignal

GetFirePattern returns the actively evoked firing pattern of this group. Once retrieved this value is reset.

func (*BasicGroup) GetId

func (g *BasicGroup) GetId() string

func (*BasicGroup) GetMatchLevel

func (g *BasicGroup) GetMatchLevel() int

GetMatchLevel returns the number of matches which occurred during the latest call to Evoke this Group. A negative match level indicates mismatches.

func (*BasicGroup) GetMatchPattern

func (g *BasicGroup) GetMatchPattern() QualitativeSignal

GetMatchPattern returns a QualitativeSignal where each feature indicates the match condition of a neuron in the Group

func (*BasicGroup) GetMisMatchPattern

func (g *BasicGroup) GetMisMatchPattern() QualitativeSignal

GetMisMatchPattern returns a QualitativeSignal where each feature indicates the mismatch condition of a neuron in the Group

func (*BasicGroup) GetNoveltyLevel

func (g *BasicGroup) GetNoveltyLevel() int

func (*BasicGroup) GetNoveltyPattern

func (g *BasicGroup) GetNoveltyPattern() QualitativeSignal

type Group

type Group interface {
	GetId() string
	GetFirePattern() QualitativeSignal
	GetMatchPattern() QualitativeSignal
	GetMisMatchPattern() QualitativeSignal
	GetMatchLevel() int
	GetNoveltyPattern() QualitativeSignal
	GetNoveltyLevel() int
	Evoke(main, association QualitativeSignal) QualitativeSignal
	AsyncEvoke(main, association QualitativeSignal, wg *sync.WaitGroup) QualitativeSignal
}

A Group is the atomic unit of learning. A Group should be capable of learning an association between a pattern and a main signal. A Group should be capable of re-emitting a main signal in the absence of the main signal provided the associated signal pattern. A Group should produce Match, Mismatch, and Novelty patterns depending on the relationship between the main signal and the associative signal at a moment of time, T.

type QualitativeSignal

type QualitativeSignal struct {
	Id       string          // A descriptive name for this signal. Useful in identification of this signal.
	Novelty  int             // The sum of all the novelty events in the production of this firing Pattern.
	MisMatch int             // The sum of all the mismatches in the production of this firing Pattern.
	Features map[Address]int // The complete set of active features in the QualitativeSignal.
}

A QualitativeSignal is the smallest unit of information in Gracious. A QualitativeSignal is a form of data representation which does not translate signal from its original form, as is necessary in Digital Signal Processing. Instead, all signal manipulation in Gracious deals with the dynamic association and associational evocation of distributed signals with one another.

A helpful example of a distributed signal is the phenomena of sight. Each sensory neuron for a given point on the contact surface is tuned to a different frequency of light. A distributed signal would be the exact firing Pattern at that point. If we say that we can determine, in a given contact point, 3 distinct color values, then a distributed signal of size 3. In this situation the signal could be in any of 2^n, 8, states.

func NewQualitativeSignal

func NewQualitativeSignal(name string) QualitativeSignal

NewQualitativeSignal returns a new QualitativeSignal initialized with no Features set. The QualitativeSignal's size at this point is 0, and it occupies very little space in the system. As Features are set more, more will populate the quale. Zero values will never be set, as the 0 is assumed by the absence of a feature.

func (*QualitativeSignal) Composite

func (q *QualitativeSignal) Composite(signals ...QualitativeSignal)

Composite will add all the features of each signal to the features of Q. Where-ever there is overlap the features are summed.

func (*QualitativeSignal) Decay

func (q *QualitativeSignal) Decay(factor int)

Decay will reduce the strength of every signal in the QualitativeSignal by the parameter, factor. The signal level will continue to drop until it reaches 1. The signal level can not drop below 1, otherwise the meaning of the signal Pattern would be lost.

func (*QualitativeSignal) Represent

func (q *QualitativeSignal) Represent() string

Represent returns a helpful string representation of this QualitativeSignal.

func (*QualitativeSignal) WinnerTakesAll

func (q *QualitativeSignal) WinnerTakesAll(gap int)

WinnerTakesAll forces the Features in the QualitativeSignal to fight for dominance and only the strongest features will remain present in the signal. The gap parameter permits a level of tolerance for features which almost meet with max threshold. No signal beneath 1 will ever be passed through. Signals with values above 4, will be reduced by half.

type Synapse

type Synapse struct {
	// contains filtered or unexported fields
}

The Synapse performs the crucial job of connecting associations to neuron groups. Each synapse has a certain weight which is either negative 1 or positive one. Once the weight has been set to one via +3:-1 Hebbian learning, the weight must be reset by a raise in the correlation sum threshold value.

func NewSynapse

func NewSynapse() *Synapse

NewSynapse initializes a new Synapse with a -1 weight value and a 0 correlation sum. A pointer to the Synapse is returned.

func (*Synapse) Evoke

func (syn *Synapse) Evoke(association int) int

Evoke is invoked at time, T, to return the result of the associational operation between the feature signal and the synaptic weight.

func (*Synapse) Train

func (syn *Synapse) Train(training int, association int, correlation int)

Train trains the synapse for later evocation. For learning we use an optimized correlative Hebbian learning algorithm for training, which prioritizes bit-shifting for multiplications and performs +3:-1 incremental steps.

Directories

Path Synopsis
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL