Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Looking causes Percepts
- oper(Agent, look(Agent)),
- [ h(in, Agent, Here),
- believe(Agent, h(_, Here, _)),
- Here \= Agent
- ], % path(Here, There)
- [ precept(Agent, h(_, Here, _)) ]).
- % Return an operator after substituting Agent for Agent.
- oper(Agent, goto_dir(Agent, walk, ExitName),
- [ h(in, Agent, Here),
- believe(Agent, h(exit(ExitName), Here, _)),
- h(exit(ExitName), Here, There),
- h(exit(ReverseExit), There, Here)),
- Here \= Agent, There \= Agent, Here \= There, ReverseExit \= ExitName
- ], % path(Here, There)
- [ ~h(in, Agent, Here),
- precept_local(Here, leaves(Agent, Here, ExitName)),
- h(in, Agent, There),
- precept_local(There,arrives(Agent, There, ReverseExit)),
- ]).
- % the World agent has a *goal that no events go unhandled
- oper(world, handle_events(Here),
- [ precept_local(Here, Event)]
- [ ~precept_local(Here, Event),
- for((h(in, Agent, Here),prop(Agent,inherited(preceptQ))),precept(Agent,Event))]).
- % deducer Agents who preceive leavers from some exit believe the leaving point is an exit
- oper(Agent, precept(Agent, leaves(Someone, Here, ExitName)),
- [ did(goto_dir(Someone, walk, ExitName)),
- prop(Agent,inherited(deducer)),
- h(in, Agent, Here) ],
- [ believe(Agent, h(exit(ExitName), Here, _)),
- believe(Agent, prop(Someone,inherited(actor)))]).
- % deducer Agents who preceive arivers from some entrance believe the entry location is an exit
- oper(Agent, precept(Agent, arrives(Someone, Here, ExitName)),
- [ did(goto_dir(Someone, walk, ExitName)),
- prop(Agent,inherited(deducer)),
- h(in, Agent, Here) ],
- [ believe(Agent, h(exit(ExitName), Here, _)),
- believe(Agent, prop(Someone,inherited(actor)))]).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement