An Actual Game
We have enough material to write a functional player. Here is a tar file with the required infrastructure to
communicate with the game server.
- First task is to make sure you can actually execute the enclosed
main
.
- Second task is to familiarize yourself with the following three
files:
main.ml
: nothing absolutely important here but please
familiarize yourself with the main protocol.
game.ml
: much of this should be familiar already; it
is mostly about encoding the board, the packages, the robots,
etc. There a couple of new things though.
player.ml
: this is where all your work will be. The
function play
is a loop which reads updates from the
server, updates the configuration defined in game.ml
, and
then issues a new command to the server. The function
compute_current_command
currently returns a syntactically
correct but otherwise non-sensical command.
- Your main task is to integrate as much of what we have done:
knapsack and shortest paths, and use them to compute a more sensible
command. Try to aim for something modest at this point. We still have
a few more weeks to go.