class NoticeCountSameAsTarget(AcNode): threshold = 1.0 acs = [ OrFail(LookFor(OfClass(Count), asgn_to='node1'), CantFind.from_env(criteria=OfClass(Count))), OrFail(LookFor(OfClass(Target), asgn_to='node2'), CantFind.from_env(criteria=OfClass(Target))), OrFail(EqualValue(), NotEqualValue.from_env(node1='node1', node2='node2')), Taggees('node1', 'node2'), TagWith(SameValue) ]
class AddAllInGlom(AcNode): threshold = 1.0 acs = [ All(And(OfClass(Number), CTagged(Avail))), WithNameOverride(LookFor(And(OfClass(Plus), CTagged(Allowed)), focal_point=InWorkspace), focal_point='opwithin'), AddNode( Proposal, action=ConsumeOperands(), proposed_operands='nodes', proposed_operator='node', ) ]
class ProposeDoingNoticedOperation(Persistent, AcNode): acs = [ LookFor(OperatorWithAvailOperands(), focal_point=InWorkspace, asgn_to='operator'), #AsgnNeighbors(node='operator', port_label=Quote('operands')), AsgnProposedNeighbors(node='operator', port_label=Quote('operands')), AddNode( Proposal, action=ConsumeOperands(), #proposed_operands='operands', neighbors='proposed', # HACKish: neighbors is a dict; handled specially by AddNode proposed_operator='operator', completion_of='this', support_from='this'), Boost(nodes='node') ]
class NoticeSolved(Persistent, AcNode): acs = [ LookFor(OfClass(Target), asgn_to='target'), LookFor(CTagged(Avail), cond=EqualValue('node', 'target')), Raise(NumboSuccess, node='node', target='target') ]
class Looker(AcNode): acs = [LookFor(OfClass(Count)), Raise(FoundNode, node='node')]
class NoticeSolved(AcNode): acs = [ LookFor(CTagged(Avail), cond=EqualValue('node', 'target')), Raise(NumboSuccess, node='node', target='target') ]
class FindPlus(AcNode): acs = [ LookFor(Plus, focal_point=MyContext), Raise(FoundNode, node='node') ]
class FindPlus(AcNode): acs = [ LookFor(OfClass(Plus), focal_point=InWorkspace), Raise(FoundNode, node='node') ]