PerkunWars Perkun sessions

The files from the folder perkun/final_code are Perkun specifications and they can be executed directly with perkun. The files are:
  • dorban_general.perkun
  • pregor_general.perkun
  • thragos_general.perkun
For example run in a terminal:

perkun dorban_general.perkun
It will print out:

loop with depth 3
I expect the values of the variables: where_is_Dorban do_I_see_vampire 
perkun>
You have entered the interactive optimization mode. Type "place_Wyzima false". It means "Dorban is in Wyzima and cannot see the vampire".

belief:
where_is_vampire=place_Wyzima where_is_Dorban=place_Wyzima do_I_see_vampire=false 0.00000
where_is_vampire=place_Shadizar where_is_Dorban=place_Wyzima do_I_see_vampire=false 0.500000
where_is_vampire=place_Novigrad where_is_Dorban=place_Wyzima do_I_see_vampire=false 0.500000
optimal action:
action=goto_Shadizar 
perkun> 
It means that Dorban believes the vampire to be in Shadizar (50%) or in Novigrad (50%). It also chooses an optimal action "goto_Shadizar". Let's type "place_Shadizar false". It means "Dorban is in Shadizar and cannot see the vampire".

belief:
where_is_vampire=place_Wyzima where_is_Dorban=place_Shadizar do_I_see_vampire=false 0.00000
where_is_vampire=place_Shadizar where_is_Dorban=place_Shadizar do_I_see_vampire=false 0.00000
where_is_vampire=place_Novigrad where_is_Dorban=place_Shadizar do_I_see_vampire=false 1.00000
optimal action:
action=goto_Novigrad 
perkun> 
Now Dorban believes the vampire must be in Novigrad, because he hasn't seen him both in Wyzima and in Shadizar. This is the point with Perkun! The optimizer maintains its belief, it is not stateless. Let's type now "place_Novigrad true":

belief:
where_is_vampire=place_Wyzima where_is_Dorban=place_Novigrad do_I_see_vampire=true 0.00000
where_is_vampire=place_Shadizar where_is_Dorban=place_Novigrad do_I_see_vampire=true 0.00000
where_is_vampire=place_Novigrad where_is_Dorban=place_Novigrad do_I_see_vampire=true 1.00000
optimal action:
action=do_nothing
perkun>
Now the belief does not change (Dorban KNOWS that the vampire is in Novigrad because he can see him). And the optimal action is "do_nothing", i.e. stay in Novigrad. You can experiment with the other files from the perkun/final_code as well. You will see that both Pregor and Thragos are avoiding the vampire.