All Downloads are FREE. Search and download functionalities are using the official Maven repository.

APT.all-test.Johnbot.Johnbot.explore.visit-unexplored-room.soar Maven / Gradle / Ivy

#echo "\nLoading explore/visit-unexplored-room"

## This goal will decide which room to explore next
##  and then go through the door on the way to that room.
##  Terminates when current-room changes.
 
sp {explore*propose*unexplored-room
   (state  ^name explore
              ^explore-room.updated-paths true)
   -->
   ( ^operator  + =)
   ( ^name visit-unexplored-room)}

sp {explore*propose*unexplored-room*no-last-room
   (state  ^name explore
              ^explore-room.explored true
              ^top-state.map.last-room none)
   -->
   ( ^operator  + =)
   ( ^name visit-unexplored-room)}

sp {explore*apply*visit-unexplored-room*remove*deleted-room
   (state  ^operator.name visit-unexplored-room
              ^top-state.map )
   ( ^deleted-room 
          ^unexplored-rooms )
   ( ^room 
         ^next )
   -->
   (write (crlf) |Delete room | )
   ( ^deleted-room  -
          ^unexplored-rooms  -
          ^unexplored-rooms )
   }