Next: Play Strategy
Up: Parent-Child Protocol
Previous: Protocol---Parent Side
Each of the seven child processes speaks the converse of the parent
side of the protocol.
All reads are made from the standard input stream and all sends are done
to the standard output stream.
The only exceptions are fatal error messages, which go to the standard error
The details of this protocol are as follows:
- Read an indicator of who's going first.
- If the first character of that message is `n' or `N', read a
message containing the opponent's first move.
- Read a message containing a suggested move for evaluation.
- Send a message containing the integer evaluation value for that move.
- Read a message containing the move selected for the computer.
- Read a message indicating whether or not to continue.
- If the first character of that message is `n', then exit.
- Otherwise, read a message containing the opponent's next move.
- Go to step 3.
Each child maintains a copy of the current board on which it bases its
evaluation of the suggested move.
Brian L. Stuart