Нейросеть как база данных активаций

, , . . , , . - . .



. .
If, And — , — , .
Or — , . — , — And. , , . , instruction pointer — « ». .

class NC;//
class Link {
	public:
		NC& _from;
		NC& _to;
		...
};
Class LinksO;/*    .     boost::intrusive
 -       */
class LinksI;//   boost::intrusive
struct NeuronA1 {
	qreal _activation = 0;
	static const qreal _threashold = 1;//          ,   .
	bool activated()const {
		return _activation >= _threshold;
	}
};
struct NeuronAT {
	qreal _activation = 0;
	qreal _threashold = 1;//  
	bool activated()const {
		return _activation >= _threshold;
	}
};
class NC {
	public:
		LinksO _next;
		LinksO _down;
		
		LinksI _prev;
		LinksI _up;
		
		NeuronA1 _nrnSumPrev;
		NeuronAT _nrnSumFromBottom;
		...
}
//  ,     _nrnSumPrev:
void NC::sendActivationToNext() {
	for(Link& link: _next) {
		link._to._nrnSumPrev._activation += 1;
	}
}
//      - and/or/not  :
bool NC::allowedToActivateByPrevChain()const {
	if(_prev.isEmpty())//    ,    ,    .
		return true;//    ,     .
	return _nrnSumPrev.activated();
	//         ,         .
	//      0    .
	// -     ,   -     ,    .
}

, _prev , . — : _next , _prev — . , — . .

, , .
- , , :

bool NC::allowedToActivateByPrevChain()const {
	for(Link& link: _prev) {
		NC & nc = link._from;
		if(!nc.wasActivated())//   
			return false;
	}
	return true;
}


:
1) , — , . .
2) : , , — . - — .
3) : , , .
, — :
class Link {
	...
	int _delay = 1;
};

:
bool NC::allowedToActivateByPrevChain()const {
	for(Link& link: _prev) {
		NC & nc = link._from;
		if(!nc.wasActivated(link._delay))// N  
			return false;
	}
	return true;
}


4) « , , ...»: , .
5) , (, ), . .
6) , « », « », « DSL » :



:
1) : , ( ?) ( , ), . , .
2) .
3) , , : , , . . , «» , . , , . , — , ?

, , N , ( ) :

NC* Brain::_hippo;// ,     
NC* NC::prevNC(int stepsBack)const {
	//       _prev
	//   link._delay,       .
	// , () 
}
bool NC::wasActivated(int stepsAgo)const {
	NC* timeStamp = _brain._hippo->prevNC(stepsAgo);
	if(!timeStamp)//       
		return false;
	return linkExists(timeStamp, this);
//      ,   boost    intrusive ,
//  ,    node    2  3 
}

, , . , : , «», .
, , , , , . .? — . ( , ), , . , . : — , () 16 , . : , , — , — . , , .

Source: https://habr.com/ru/post/pt388797/


All Articles