-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Kacper Sokol edited this page Feb 17, 2018
·
8 revisions
- You need the latest version of this coursework.
- You need a fairly up to date version of SWI-Prolog.
- You need to be connected to the internet.
- There is a library file for each part of this assignment in the
ailp/library
directory. Each assignment libraryassignmentN_library.pl
(where N is assignment number) holds the functions you will use. YOU SHOULD NOT CHANGE THIS FILE.
- Change directory to the root folder (i.e. one that contains this readme.md).
- Update your candidate number (this is neither your user id nor your student number but a five-digit number that you can find on your SAFE profile page) in the
assignmentN_12345.pl
filename andcandidate_number/1
predicate in this file. This is part of the assignment spec and hence failure to adhere to this will lose you marks! - Start the assignment (if this doesn't work try
chmod +x asilp.pl
first) with./ailp.pl assignmentN
:-
./ailp.pl assignment1
to start assignment1, -
./ailp.pl assignment2
to start assignment2.
-
- The file with your answers, e.g.
assignment1_12345.pl
, will be consulted automatically. - Start solving the assignment.
- To start the web server type command
start.
. This will give you an option to open a browser. Press Enter or typeY
. - Go to the web browser and press the Run button.
- To start with a fresh board type:
-
reset.
for assignment 1, or -
join_game(A).
,reset_game.
and finallystart_game.
for assignment 2.
-
- To stop the web server type command
stop.
. - Don't forget to use
make.
andreset.
orreset_game.
when you have made changes to the code.
- To start the web server type command
- Place all your code in the designated
assignmentN_12345.pl
file. - Do not change the library files unless otherwise instructed.
- Do not use
start/0
,stop/0
,reset/0
,join_game/1
,reset_game/0
andstart_game/0
predicates in your answers. - In your answers you can only use predicates from the library which are exported in the module definition (see the list below).
Assignment 1 | Assignment 2 -- part 1, 3 and 4 | Assignment 2 -- part 2 |
---|---|---|
ailp_show_move/2 |
map_adjacent/3 |
wp/1 |
ailp_start_position/1 |
map_distance/3 |
wp/2 |
ailp_show_complete/0 |
shell/0 |
wt_link/2 |
ailp_grid_size/1 |
say/2 |
actor/1 |
complete/1 |
query_world/2 |
link/1 |
new_pos/3 |
possible_query/2 |
init_identity/0 |
m/1 |
my_agent/1 |
test/0 |
next/1 |
start/0 |
agent_ask_oracle/4 |
start/0 |
stop/0 |
|
stop/0 |
join_game/1 |
|
reset/0 |
reset_game/0 |
|
toggle_switch/1 |
start_game/0 |
|
get_switch/2 |
leave_game/0 |
Failure to comply with this will result in losing marks!