TIB: Chess AI (again)


[Prev][Next][Index][Thread]

TIB: Chess AI (again)




Okay, I think I've put together a basic plan for how I'm going to do this.  
I've done some research, and I think that its unreasonable to expect a 
TI-Basic prog to do too much, so I'm not going to try.  At least not for the 
first version.  Here's a basic outline of the way it will think:

Step One: preparation
- scan through board and compile a list of all possible moves

Step Two: opening book check (this step will probably be omitted from the 
first release, to make it simpler)
- check current and previous boards against listed opening book (will 
eventually be a module; create and use your own opening book)
- if match is found, list the next move and give it a +1 bonus

Step Three: evaluate
- scan through the entire list of possible moves.  assign each move a value 
based on:
    - piece capture/future piece capture (next move)
    - position
    - check/checkmate
- take the top 4 moves (highest values)
- simulate each move, then simulate opponent's next move
- assign penalties to each move as follows:
    - opponent piece capture (take one of your pieces)
    - opponent position (very small penalty)
    - opponent check/checkmate
- check if moves are above bottom threshold.  If yes, make best move.  If no, 
repeat opponent's move sim with next 4 moves.
- check if above threshold.  If yes, make best move.  If no, then take best 
move out of top 8 and make that move.

While it only looks ahead a single move, which is pretty bad compared to most 
chess programs and players, I think this is the best that can be expected of 
TI-Basic.  Maybe another thought layer can be added in the future if space 
and speed permit.  In any case, I would appreciate some input on this plan.  
Thanks!

Eric Tollefson


Follow-Ups: