Hello,
I'm adding more information.
If you want to practice with the server, you must:
install python
install pyglet
both of which are free and easy to install.
The competition will be on Friday, January 30th in the afternoon. The location is to be decided, but there will be some sort of mail flyer next week about location.
The winner of the competition will be given free Jimmy John's. Winning is determined via a two-match game where both people get the opportunity to go first... In the event of a tie, the lowest number of words (according to wc) wins. This includes comments, so I would recommend going to the competition with your commented code, taking a few minutes to make a copy of your code with the comments stripped out, and then compete with said code.
There will be other side-certificates, such as "most obscure language" and "most languages used" as well as any other weird awards I think of. These will not be accompanied by Jimmy Johns, but may look far nerdier.
I have attached the server for you to play with while developing your AI... It is written in Python, and works anywhere Python and pyglet work, which is all major operating systems.
The wrappers for your programs are still being developed so that all you have to worry about is the AI, but you can connect to this using telnet or PuTTY and give it a try to see how the IO will work. Good luck everyone!
Note: PuTTY was giving me grief when entering a name, so your name is NoBody if you connect using putty. Also, remember to connect via telnet, not ssh.
Interface:
After connecting, you will receive the text "Name:". Enter the name you want to be displayed as on this line and give a newline.
You will then receive the current state of the board. 'r' represents you, 'b' represents your opponent, '.' represents an open space.
The furthest left column is column 0, the furthest right is column six.
After receiving the ascii representation of the board, you will need to send a number between 0 and 6 followed by a newline representing which column you are dropping your chip into. In the case that you make a wrong move, your move is ignored, and the opponent gets a free move. You are not notified in any way whether or not your move was legal.
All interfacing will have the option of connecting directly to the server, but a wrapper will also be provided that will tie your input and output from stdin and stdout to the port.
Example:
You will have to interface as shown below... The text in red italics is your input. The player below was the black chip on the screen, his moves are represented as r still, as all of your chips are always r and the opponent is always black.
Name: Steve
.......
.......
.......
.......
.......
...b...
2
.......
.......
.......
.......
..b....
..rb...
3
.......
.......
.......
...b...
..br...
..rb...
1
.......
.......
.......
..bb...
..br...
.rrb...
0
.......
.......
.......
..bb...
..br...
rrrb.b.
0
.......
.......
.......
b.bb...
r.br...
rrrb.b.
0
.......
.......
r.b....
b.bb...
r.br...
rrrb.b.
5
LOSE
The ports you connect on are port 1337 and 1338. You have to connect to port 1337 first. This player is the red player.. As you can see, you do not see your losing move, you only receive a board if you have not yet lost.
After both players are connected, the server opens a game window and the game begins with a graphical representation of the above ascii carnage.
If you have any questions, post to the group, i have changed settings so that members can post to this group.
Good Luck!
--
Nick Wertzberger