Skip to content

Commit

Permalink
1. mv的absPort&conPort强度为0的bugfix; 2. 激活神经元强度+1;
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaxiaogang committed Oct 20, 2018
1 parent 968c291 commit 05007e0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SMG_NothingIsAll/AIFoundation/AIThinkingControl/AIThinkingControl.m"
timestampString = "561717925.328015"
timestampString = "561765526.358838"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "610"
Expand Down
4 changes: 2 additions & 2 deletions SMG_NothingIsAll/AIFoundation/AINet/AINetAbsCMV/AINetAbsCMV.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ -(AIAbsCMVNode*) create:(AIKVPointer*)absNode_p aMv_p:(AIKVPointer*)aMv_p bMv_p:
//5. 关联conPorts插口
AIPort *aConPort = [[AIPort alloc] init];
aConPort.target_p = aMv_p;
[result_acn addConPorts:aConPort];
[result_acn addConPorts:aConPort difValue:1];

AIPort *bConPort = [[AIPort alloc] init];
bConPort.target_p = bMv_p;
[result_acn addConPorts:bConPort];
[result_acn addConPorts:bConPort difValue:1];

//6. 关联absPort插口
AIPort *absNPort = [[AIPort alloc] init];
Expand Down
4 changes: 2 additions & 2 deletions SMG_NothingIsAll/AIFoundation/AINet/AINode/AIAbsCMVNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
* MARK:--------------------添加具象关联--------------------
* 注:从大到小(5,4,3,2,1)
*/
-(void) addConPorts:(AIPort*)conPort;

-(void) addConPorts:(AIPort*)conPort difValue:(NSInteger)difValue;

-(AIPort*) getConPort:(NSInteger)index;


/**
* MARK:--------------------获取conPort--------------------
* @param except_ps : 要排除的pointer数组;
* 注: 被激活的AIPort自动strong.value + 1;
*/
-(AIPort*) getConPortWithExcept:(NSArray*)except_ps;

Expand Down
4 changes: 3 additions & 1 deletion SMG_NothingIsAll/AIFoundation/AINet/AINode/AIAbsCMVNode.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ - (NSMutableArray *)conPorts{
* MARK:--------------------添加具象关联--------------------
* 注:从大到小(5,4,3,2,1)
*/
-(void) addConPorts:(AIPort*)conPort{
-(void) addConPorts:(AIPort*)conPort difValue:(NSInteger)difValue{
//1. 数据检查
if (conPort == nil) {
return;
}
conPort.strong.value += difValue;

//2. 去重
for (NSInteger i = 0; i < self.conPorts.count; i++) {
Expand Down Expand Up @@ -72,6 +73,7 @@ -(AIPort*) getConPortWithExcept:(NSArray*)except_ps{
}
}
if (!excepted) {
conPort.strong.value += 1;//被激活强度+1;
return conPort;
}
}
Expand Down
1 change: 1 addition & 0 deletions SMG_NothingIsAll/AIFoundation/AINet/AIPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* 注:为简化设计;
* 1. 由AINode.xxxPorts替代了AILineType
* 2. 由AIPortStrong替代了AILineStrong
* 3. 互相关联,不表示强度值一致,所以A与B关联,有可能A的强度为3,B却为100;
*/
@interface AIPortStrong : NSObject <NSCoding>

Expand Down

0 comments on commit 05007e0

Please sign in to comment.