Post by gtoal on Dec 25, 2020 11:48:12 GMT -5
A couple of weeks ago, I was musing on an old photo from my student days, of a VT15 terminal attached to a PDP15, which was displaying a vector Chess game. So I thought I would find some chess engine on the net and add Vectrex graphics to it and have a chess game on the Vectrex. Well, I couldn't find the original DEC graphics and had to design a vector chess set myself, which I posted on the FB group for comments. Turns out one of the group (Roger Boesch) was already working on a chess engine for the Vectrex, but hadn't started on the graphics yet - so I donated my graphics and left the creation of a game to him... and looked for another project to take on. Obvious first thing that came to mind... Draughts (checkers).
Fortunately an old pal from my student days had written a pretty definitive draughts engine back in the 70's. Being old it had the advantage of a small footprint, while still being pretty powerful. It was actually originally a learning AI that played humans and played itself to improve, and the final version was encapsulated in half a dozen constants used as weights for different board evaluation factors. This meant that all the learning code could be omitted and replaced by 6 constants :-)
I started the port 8 days ago - first from Imp (an Algol60-like language) to C, then a lot of restructuring to make it compatible with a polled game loop instead of imperative flow control. A couple of days spent reducing the RAM footprint even farther, to allow the minimax to evaluate 12 plies, and a few days of debugging (problems caused by conversion from a 32-bit system to an 8-bit system) ... and seven days later we have a working draughts game.
The credit for the game goes entirely to my friend Ken Chisholm, from Edinburgh, and his original program, "Draft4". (He's now on Draft5 I think, which uses a genetic algorithm to improve mid-game play).
Working on this was like being back at work after a 6 year retirement... late nights to meet a hard (self-imposed) deadline of getting it out on Christmas Day for you all to enjoy:
gtoal.com/vectrex/chess/draft4-xmas.bin
I got it working at 2am on Christmas morning; it has not been extensively tested!
(Do me a favour and don't upload this version to any other sites - I'll make another release with a better UI etc under less time pressure in the new year.)
You select the square you are going to move from with button 4, move to where you want to drop the man using the joystick, and place it using button 4 again. If you change your mind or get confused you can cancel the selected square with button 3. Holding button 3 down for an extended period brings up an option to resign.
You decide who plays first initially with button 1 or button 2, and subsequent games alternate.
The display is mostly suppressed while the AI is thinking. If I didn't do that, the thinking time would be unpleasantly long.
Have fun,
Graham
Fortunately an old pal from my student days had written a pretty definitive draughts engine back in the 70's. Being old it had the advantage of a small footprint, while still being pretty powerful. It was actually originally a learning AI that played humans and played itself to improve, and the final version was encapsulated in half a dozen constants used as weights for different board evaluation factors. This meant that all the learning code could be omitted and replaced by 6 constants :-)
I started the port 8 days ago - first from Imp (an Algol60-like language) to C, then a lot of restructuring to make it compatible with a polled game loop instead of imperative flow control. A couple of days spent reducing the RAM footprint even farther, to allow the minimax to evaluate 12 plies, and a few days of debugging (problems caused by conversion from a 32-bit system to an 8-bit system) ... and seven days later we have a working draughts game.
The credit for the game goes entirely to my friend Ken Chisholm, from Edinburgh, and his original program, "Draft4". (He's now on Draft5 I think, which uses a genetic algorithm to improve mid-game play).
Working on this was like being back at work after a 6 year retirement... late nights to meet a hard (self-imposed) deadline of getting it out on Christmas Day for you all to enjoy:
gtoal.com/vectrex/chess/draft4-xmas.bin
I got it working at 2am on Christmas morning; it has not been extensively tested!
(Do me a favour and don't upload this version to any other sites - I'll make another release with a better UI etc under less time pressure in the new year.)
You select the square you are going to move from with button 4, move to where you want to drop the man using the joystick, and place it using button 4 again. If you change your mind or get confused you can cancel the selected square with button 3. Holding button 3 down for an extended period brings up an option to resign.
You decide who plays first initially with button 1 or button 2, and subsequent games alternate.
The display is mostly suppressed while the AI is thinking. If I didn't do that, the thinking time would be unpleasantly long.
Have fun,
Graham