@@ -60,10 +60,10 @@ def NACE_Cycle(Time, FocusSet, RuleEvidence, loc, observed_world, rulesin, negru
6060 action = favoured_actions_for_revisit [0 ]
6161 plan = favoured_actions_for_revisit
6262 else :
63- print ("BABBLE" , "score:" , airis_score )
63+ print ("BABBLE" )
6464 action = random .choice (actions ) #motorbabbling
6565 else :
66- print ("ACHIEVE" if airis_score == float ("-inf" ) else "CURIOUS" , Prettyprint_Plan (favoured_actions ), "score:" , - airis_score ) #, rules )
66+ print ("ACHIEVE" if airis_score == float ("-inf" ) else "CURIOUS" , Prettyprint_Plan (favoured_actions ), end = " " ); NACE_PrintScore ( airis_score )
6767 action = favoured_actions [0 ]
6868 plan = favoured_actions
6969 else :
@@ -84,7 +84,7 @@ def NACE_Cycle(Time, FocusSet, RuleEvidence, loc, observed_world, rulesin, negru
8484 loc , newworld = World_Move (loc , deepcopy (oldworld ), action )
8585 observed_world_old = deepcopy (observed_world )
8686 observed_world = World_FieldOfView (Time , loc , observed_world , newworld )
87- predicted_world , _ , __ , ___ = NACE_Predict (Time , FocusSet , deepcopy (observed_world_old ), action , rules )
87+ predicted_world , _ , __ , values = NACE_Predict (Time , FocusSet , deepcopy (observed_world_old ), action , rules )
8888 if "manual" not in sys .argv :
8989 print (f"\033 [0mWorld t={ Time } beliefs={ len (rules )} :\033 [97;40m" )
9090 World_Print (newworld )
@@ -109,7 +109,7 @@ def NACE_Cycle(Time, FocusSet, RuleEvidence, loc, observed_world, rulesin, negru
109109 newrules .add (rule )
110110 else :
111111 usedRules = newrules = newnegrules = rules
112- return usedRules , FocusSet , RuleEvidence , loc , observed_world , newrules , newnegrules , newworld , debuginput
112+ return usedRules , FocusSet , RuleEvidence , loc , observed_world , newrules , newnegrules , newworld , debuginput , values
113113
114114# Apply move to the predicted world model whereby we use the learned tules to decide how grid elements might change most likely
115115def NACE_Predict (Time , FocusSet , oldworld , action , rules , customGoal = None ):
@@ -370,3 +370,10 @@ def _RuleApplicable(scores, highscore, highesthighscore, rule):
370370 if highscore > 0.0 and scores .get (rule , 0.0 ) == highesthighscore :
371371 return True
372372 return False
373+
374+ #Print score value taking its semantics regarding its value range semantics for planning into account
375+ def NACE_PrintScore (score ):
376+ if score >= 0.0 and score <= 1.0 :
377+ print ("certainty:" , score )
378+ else :
379+ print ("desired: True" )
0 commit comments