Our Game Player
See turing:/Public/goldwasser/462/games/March17/ for the
following files:
- gameServer.py
This manages a networked game between two (or more) opponents.
Typical usage would be something like
python gameServer.py tic -n 4 -r 4 -c 8
where the particular command-line options depend on the game.
By default it uses port 9000, but you can specify something
else with -p portNum. See -h for help
on options.
- human.py
This gives either a text-based or GUI based interface for
allowing a human to play a game. The game definition is
automatically sent from the server. The main issue is whether
you want a text-based interface (the default) or a graphical
interface (by giving - v option). You can also
specify the ip address and port for the server.
Typical usage might be
python human.py-i hostIP -v
where the hostIP is localhost by default. By default, you become
player 1. But you can change to player 2
with option -g 2. The -v here is giving
you a GUI visualization. Otherwise, you are text based and may
want to do
- robot.py
This gives an automated player for the game.
Typical usage might be
python robot.py i hostIP
where the hostIP is localhost by default. By default, robot is
player 1 (the first player). But you can change to the other player
with option -g 2. In the long run, I'll have
things so that you can limit the robot's processing either by
specifying a maximum time limit per turn, or by specifying the
maximum depth that it looks at for a given position. For today,
we will use the maxDepth which can be controlled as -D plies
- kibitz.py
Allow us to monitor a game be played as a third-party.
python kibitz.py-i hostIP -p port
Michael Goldwasser
Last modified: Wednesday, 17 March 2010