+Andrew Davie Posted April 11, 2020 Author Share Posted April 11, 2020 7 hours ago, Voxel said: All the pieces look on horrified at the resulting abomination, (to the left of the cursor). I've not seen this before. Chess20200409Q_3ply.bmp 956.79 kB · 10 downloads This forum does not recognise/understand "bmp" format files. If you convert to/use JPG or probably GIF, then your screengrabs will show up inline. 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 11, 2020 Author Share Posted April 11, 2020 7 hours ago, Voxel said: The game decides to capture my king. So with that handicap out the way I keep playing. Bravely, the forces loyal to the monarch fought on until death. I think I'll have to spend some time working on detecting endgame situations. I have been thinking about it, and don't think I should have too much trouble getting it working soon. It's not so much difficult, as much as "difficult to do efficiently". Every bit of code I put in, because it runs during the search, actually runs many many times (like, 25000 times). So it slows things down. I need to consider carefully how to implement things. 1 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 12, 2020 Author Share Posted April 12, 2020 11 hours ago, Karl G said: Looking at them side by side, I would definitely say the new colors work better for contrast. Just a tip: I set the zoom in Stella to improve the visuals of the game to my eye... Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 12, 2020 Author Share Posted April 12, 2020 (edited) I have fixed the pawn promotion issue. Here's a couple of binaries to play/test. chess20200412_4ply.bin chess20200412_3ply.bin Little bastard beat me again. I'm going to have to put in cheat modes... game9.mp4 Edited April 12, 2020 by Andrew Davie 1 1 2 Quote Link to comment Share on other sites More sharing options...
Voxel Posted April 12, 2020 Share Posted April 12, 2020 1 hour ago, Andrew Davie said: Little bastard beat me again. I'm going to have to put in cheat modes... Daddy should be proud! Quote Link to comment Share on other sites More sharing options...
Voxel Posted April 12, 2020 Share Posted April 12, 2020 I'm finding that the your engine is using the most mobile piece in it's arsenal to exploit any weakness in defence on my part, before I have time to fully develop my line. Looking for a solid response. I've used this to bait the queen a couple of times, but most often it knows... It's an interesting strategy, as my Queen is looking on while her opposite is turning standard chess practice on its' head. I'm sure some Master, would have a better response. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 12, 2020 Author Share Posted April 12, 2020 (edited) 14 minutes ago, Voxel said: I'm finding that the your engine is using the most mobile piece in it's arsenal to exploit any weakness in defence on my part, before I have time to fully develop my line. Looking for a solid response. I've used this to bait the queen a couple of times, but most often it knows... It's an interesting strategy, as my Queen is looking on while her opposite is turning standard chess practice on its' head. I'm sure some Master, would have a better response. Thanks for those comments. These are in line with my experience; it is very difficult to establish a plan because it's quite happy to piece-for-piece, and always seems to find the killer move (the only one, mind) that destroys your traps. I'm happy enough with how it's playing, but I hope it's going to get much better. Also, it's not using an opening book. I'm not a big believer in such things; they take away from the "skill" of the engine. Edited April 12, 2020 by Andrew Davie Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 12, 2020 Author Share Posted April 12, 2020 (edited) Unsatisfied with the plain and indistinguishable garb provided by the royal palace, and feeling rather under-appreciated because their monarch always seemed to be out having fun on the town, and in better garb to boot, the black soldiers donned their new designer outfit... "It makes us look so... dark...", they opined to each other... "and handsome!". All agreed. "Wake me up when she's dead.", one said, "... the bitch!" Edited April 12, 2020 by Andrew Davie Quote Link to comment Share on other sites More sharing options...
Voxel Posted April 12, 2020 Share Posted April 12, 2020 5 hours ago, Andrew Davie said: Also, it's not using an opening book. I'm not a big believer in such things; they take away from the "skill" of the engine. You've mentioned this before, which explains the non-standard play, which makes this engine harder to predict. It's like the German Blitzkrieg! I can remember there were chess games who would be inclined to follow there algorithms and give a standard book opening move resulting in predictable play for a large percentage of their games. Not so for this one, I have attempted multiple games following a standard opening and cannot guarantee this engines' algorithm would follow a set pattern (it comes close). Quote Link to comment Share on other sites More sharing options...
Voxel Posted April 12, 2020 Share Posted April 12, 2020 4 hours ago, Andrew Davie said: ... the bitch!" Yeah, but what a bitch! Quote Link to comment Share on other sites More sharing options...
+fdr4prez Posted April 12, 2020 Share Posted April 12, 2020 8 hours ago, Andrew Davie said: Little bastard beat me again. I'm going to have to put in cheat modes... Isn't this how Joshua started? and the next thing you know it is playing Global Thermonuclear War against some punk kid A little chess program grew into this: 3 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 12, 2020 Author Share Posted April 12, 2020 2 hours ago, Voxel said: You've mentioned this before, which explains the non-standard play, which makes this engine harder to predict. It's like the German Blitzkrieg! I can remember there were chess games who would be inclined to follow there algorithms and give a standard book opening move resulting in predictable play for a large percentage of their games. Not so for this one, I have attempted multiple games following a standard opening and cannot guarantee this engines' algorithm would follow a set pattern (it comes close). I feel reasonable in my view that for most video game enthusiasts, this engine would give them a quick, fairly challenging, and enjoyable game of chess. Once I throw in the AtariVox insults it will have personality. It already has a certain feeling of relentless aggression. 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 12, 2020 Author Share Posted April 12, 2020 1 hour ago, fdr4prez said: Isn't this how Joshua started? and the next thing you know it is playing Global Thermonuclear War against some punk kid I will try my very best to have it speak one or two quotes from that movie 4 Quote Link to comment Share on other sites More sharing options...
Voxel Posted April 12, 2020 Share Posted April 12, 2020 6 minutes ago, Andrew Davie said: I will try my very best to have it speak one or two quotes from that movie It would be nice to have a few quotes for each scenario and depending on its' (winning) state it can select a pattern of quotes to fit a profile or at random from a selection for a given incident. I would really like to have it beat me and then say "How about a nice game of chess?" for the irony! 1 Quote Link to comment Share on other sites More sharing options...
devwebcl Posted April 13, 2020 Share Posted April 13, 2020 On 1/27/2020 at 10:16 AM, Andrew Davie said: I was thinking about the very few Atari games I've done over all these years - just mostly lots of demos. But the games - all "puzzlers", really. Qb, of course, which is an "action puzzler" but then Boulder Dash - another action/puzzler, and Sokoboo - a pure puzzler. And now Chess. I don't think there's a large audience for puzzle games, in general. I agree that the 2600 scene is not very popular with puzzles games. I enjoy them; I think many famous can be created/ported such you've done with Sokoboo. Please keep the good work. 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 13, 2020 Author Share Posted April 13, 2020 I've now got the detection working for checkmate and stalemate. It's functional in the tree search, and allowing the player to mate/stalemate via the UI. What's not working is when the computer checkmates/stalemates the player. But that should be a relatively simple task now - I just "pretend" it's the computer doing the move, fire off a 2-ply "choose best move", and it will return with the appropriate flags set. Then I switch back to the human and I know what's what. This will also remove in-check moves from the "show me available moves" that you get when you hold down the button. Here's a short video of the test-bed showing mate (red) and stalemate (green) being detected... checkmatedraw.mp4 3 Quote Link to comment Share on other sites More sharing options...
+fdr4prez Posted April 13, 2020 Share Posted April 13, 2020 Are you planning to have a splashscreen for each end of game scenario? Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 14, 2020 Author Share Posted April 14, 2020 5 hours ago, fdr4prez said: Are you planning to have a splashscreen for each end of game scenario? No, I will have large text overlaying the game board. Such as "CHECK!", "CHECK//MATE", "STALE//MATE" etc. I've already written most of the display system for this text. 1 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 14, 2020 Author Share Posted April 14, 2020 (edited) I've spent quite some time going round and round in circles, so to speak, trying to tweak the alphaBeta search. Very complex and messy because of the recursive nature of the code. Anyway, I basically "chucked a wobbly" as they say down here in Oz, and decided that since it was actually a negamax algorithm (although I didn't know it when I wrote it), I'd start afresh and actually implement negamax properly. Well, I've done that. It's not quite working perfectly yet, but it is traversing the tree as expected and selecting moves. Very very very quickly. Just early figures, but in version #0 alphabeta sort of negamaxy search (RIP, we will miss you) the search could do 3ply in about 4 seconds, 4ply in about 20 seconds and 5ply well let's say about 10minutes. The new, much more efficient negamax search is showing promising (but possibly erroneous!! we shall see) stats of 3ply in 1/2 second, 4ply in 5 seconds, 5ply in 25 seconds, 6ply in 130 seconds, and 7ply (!!!!!!) in 9.5 minutes. These are almost too good to be true - but they are increasing exponentially as expected. I just need to trace through it and fixup a few errors in the move selections. But, fingers crossed. A 5ply game should be quite challenging to most humans. Maybe in the next few days I'll be able to show the negamax search operational! OK, I got it working pretty quickly, much to my surprise. I'm just that good It's weird because it has a totally different "feel"/personality to the previous search. I think the previous search had some subtle bugs so it took more risks, was more aggressive, just sort of went for it. Interestingly there is one particular sequence of moves both this new search, and the old one, seem to just play terrible moves. There must be some logical reason, but I have yet to analyse it. I haven't got any of the checkmate/stalemate detection in this new version yet. One thing I did put in was a bit of random noise at the very bottom of the tree, so it will play slightly differently every time, provide the position allows. I'm a bit in two minds about this. It's lost personality. Anyway, moving on - I need to get quiescence in because it desperately throws pieces to be taken to avoid larger pieces to be taken. Also, when I got it in check, it decided to reply by putting me in check. Logical - king for a king - but that's just not on! So, a few steps backwards... quiescence, check detection, loss of "personality". But a few forward - negamax search, increased speed (alpha beta pruning is obviously working here, and it clearly wasn't in my earlier implementation), some variation/randomness in gameplay. I can put some personality back by refining the evaluation, I hope. Video shows the system just a few minutes after it started working. So, pretty much the first game. Truth be told, I get all excited when something starts working, and rush to share... and things aren't always what I think they are. I thought it was doing 7 or 8 ply, but in reality I had a 2x bug in my ply counter. Oh dear! But anyway, attached is a 4 ply version to play with. This has a random (up to 64/100ths of a pawn value) jiggle in the evaluation at the leaf nodes of the tree/search, so it should choose somewhat different moves and be a little adventurous but easier to beat. negamax0.mp4 chess20200415_4ply_NEGAMAX_63.bin Edited April 14, 2020 by Andrew Davie 1 2 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 14, 2020 Author Share Posted April 14, 2020 (edited) < nothing to see > Edited April 14, 2020 by Andrew Davie 1 Quote Link to comment Share on other sites More sharing options...
Voxel Posted April 14, 2020 Share Posted April 14, 2020 4 hours ago, Andrew Davie said: This has a random (up to 64/100ths of a pawn value) jiggle in the evaluation at the leaf nodes of the tree/search, so it should choose somewhat different moves and be a little adventurous but easier to beat. Please don't compromise the engine. I hope the code is optimised to win, but that manual settings will be added to offset it's winning ability only. Interesting video. In some ways the game seems to have gone back a little, as you said. I'll be waiting patiently for those routines to be added to hopefully give it back... the bitch! I've played a couple of quiick opening moves it's quite methodical in play and makes for a nice relaxing game. The Queen took some enticing to leave her spot. It's clearly a different engine, would be interesting to see this engine against the last one. Quote Link to comment Share on other sites More sharing options...
NostAlgae37 Posted April 15, 2020 Share Posted April 15, 2020 On 4/12/2020 at 8:13 AM, Andrew Davie said: Unsatisfied with the plain and indistinguishable garb provided by the royal palace, and feeling rather under-appreciated because their monarch always seemed to be out having fun on the town, and in better garb to boot, the black soldiers donned their new designer outfit... "It makes us look so... dark...", they opined to each other... "and handsome!". All agreed. "Wake me up when she's dead.", one said, "... the bitch!" I understand that you are trying to improve the color contrast of the "black" pieces, but honestly I think that the overall shape and appearance of the black pawns looked much better in the older screenshots (like back in post #395, for instance). I don't really see the recent changes as an improvement, actually I think that now the pawns for each color look more disparate in shape and less symmetrical. Just my 2 cents worth. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted April 15, 2020 Author Share Posted April 15, 2020 15 minutes ago, NostAlgae37 said: I understand that you are trying to improve the color contrast of the "black" pieces, but honestly I think that the overall shape and appearance of the black pawns looked much better in the older screenshots (like back in post #395, for instance). I don't really see the recent changes as an improvement, actually I think that now the pawns for each color look more disparate in shape and less symmetrical. Just my 2 cents worth. I value feedback, thank you. I do agree with earlier comments, though, that the pawns were very difficult to distinguish. Although I personally liked the black pawns' difference, perhaps the slight compromise shown in this screenshot is an improvement for you? Quote Link to comment Share on other sites More sharing options...
+mksmith Posted April 15, 2020 Share Posted April 15, 2020 Really enjoying your discussions Andrew - very inciteful explanation of the methods and advancement as you make them. Will make a great read for you once your done ? 1 Quote Link to comment Share on other sites More sharing options...
stepho Posted April 16, 2020 Share Posted April 16, 2020 My 2c worth... I like the tops of the pawns being a bit dimmer. Gives them a slightly 3D look (like the top of a shaded sphere). The random element is a good thing. Technically, it makes it play a weaker game. But if we find a sequence of moves that win then we can replay those moves to win anytime - as boring as that would be. A self learning AI would learn and avoid those moves in the future but of course we understand that is another level of difficult above the current target. A slight random element is a good fall back to prevent repeatable play. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.