assignment of Logic subject of the faundamental of artificial intelligence
First you should have swi-prolog installed on your computer Then when you wanna run the code and see your code inferences' resaults, you should enter these commands first to compile, access the files and run your main program. First of all, download and install SWI-Prolog from here. Start SWI-Prolog in project directory:
$ swipl
Load the world simulator:
?- [wumpus_world_excercise].
Load the agent:
?- [my_agent].
Run the agent:
?- evaluate_agent(1, Score, Time).
Press y - You can also run this directly:
[wumpus_world_excercise]. [my_agent]. evaluate_agent(1, Score, Time). y
Command | Does... |
---|---|
stench(yes) |
There is a stench. |
agent_location(X,Y) |
Agent is in room [x.y]. |
wumpus_location(X,Y) |
Agent is in room [x.y]. |
breeze(yes) |
There is a breeze. |
glitter(yes) |
There is a glitter. |
gold(X,Y) |
Gold is in room [x.y]. |
pit(X,Y) |
Pit is in room [x.y]. |
- Task1
- Task2