|
Post by tsh73 on Feb 13, 2021 20:23:44 GMT
Found: weird UNDO behaviour
start: I go a2-a4 AI go f7-f5 name it POSITION1 I UNDO position switch back to initial one I go b2-b4 AI go e7-e5 I UNDO !!! position switch not to initial one, but to POSITION1
(found mid-game on over moves, used a2-a4 b2-b4 for clear difference)
|
|
|
Post by tsh73 on Feb 13, 2021 20:44:52 GMT
Weird behaviour I've seen it several times - but now I have import/export ready to share it :) If I do Nb1-a3 AI replies . Bg6xe4 So it loses Bishop. FEN string is rn2kb1r/ppp1n1pp/q4pb1/4p3/4P1P1/1B1P1N1P/PPP2P2/RNBQ1RK w KQkq - 0 1 - now you could load it in J-board, export it for Chess 2.5 and see for yourself. My guess is that maxLevel=3 is not enough for this. Something along that: of first half move, it takes pawn on second he considers me taking a bishop on third move he imagines taking my rook with a queen. Such a value! ;) Rook is under king's guard - but it does not look any more after 3 half moves. *let's set maxlevel to 4 and load same position* It thought for 1.34 sec and moved . Bg6-f7 instead.
|
|
|
Post by Rod on Feb 14, 2021 9:28:19 GMT
Thanks, undo will take a bit of thinking through. I have two undo files and I forget why that became necessary! Level 4 play sounds perfectly right. But then it might beat me more regularly and take its time doing so!
It is never going to be a great chess system. There is not one iota of strategy. It is absolutely amazing to me that it plays so well for the "simple" thing that it is.
|
|
|
Post by B+ on Feb 14, 2021 15:43:19 GMT
Who wants a great chess system, a Grand Master maybe, I'd be happy for a little tiny, itsy-bitsy, iota of a variance in opening move. ;-)) Rod I am inclined to inquire how you find time for all this? Do you have a regular job? married? but that is PM stuff or none of my business, just curious As for myself, I am retired and not married but carrying for senile mother (and diabetic dog). I have time that I promised myself back in day when burning candle at both ends, early 90's.. the job(s) weren't holding a candle, in interest level, to coding. Sorry for getting personal, it's Valentine's Day and I am thinking about others maybe more than usual. I was up to 4 AM last night and then up again, 9 AM, just like the old days with Interpreter Project that is absolute Heaven (when it works) and Hell (when it doesn't)! None in my family knows what it is like but I bet you guys here do! Well if it's going to be, it's probably up to me! I will put it on my stack.
|
|
|
Post by Rod on Feb 14, 2021 17:22:42 GMT
Oh I am well and truly married, both retired and despite that I do struggle to find enough time for computing. No senile mothers sadly. We do have a decrepit 28 year old horse which takes up a lot of time, but rewarding time.
Feel free to push on with adding strategy. I would not know how to begin as I am a only learning chess as we create this code. A random opening move would be relatively easy, perhaps even a random opening set of moves. Beyond opening I am not sure how you would introduce strategy.
|
|
|
Post by B+ on Feb 14, 2021 18:22:04 GMT
Yes, I am thinking just from a set of standard first moves randomly pick one and let the AI take if from there.
White pretty much sets the pace of game by just that 1 first move until or if Black gets him out off his plan for world dominance.
To paraphrase military leaders, no plan survives it's first contact with reality. Which means don't bother saving sets and sets of game Openings, to me anyway, whom is not inclined towards rote memorization anyway. But a tiny bit of research might give some set of first moves for White when AI is playing that. White might use openings his opponent seems more weak at, so could save Whites first move and final result, so randomness isn't entirely relied upon.
|
|
|
Post by tsh73 on Feb 14, 2021 21:14:31 GMT
My smaller kid (age 10) enjoys beating Chess2.5 at maxLevel=2 (she knows moves but has not any tactics,and I think I give her too much hints/clues ) But the point is she enjoys that ;) (once I've seen her getting pretty fast checkmate from AI at maxLevel=3 )
so today I explained her how to checkmate * Queen, Rook & King against King * Queen & King against King * Rook & King against King - I am to see if she remember something yet ;)
And now I just set same initial positions for AI to work. On default maxLevel=3: * Queen, Rook & King against King - it got me stalemated, that is, draw by the rules (well I might be really lucky) Ah, he just did it again at maxLevel=4 (different sequence but same result - stalemate) * Queen & King against King - it went repeating same sequence of moves, that is, draw by the rules Got stalemate at maxLevel=4 * Rook & King against King - it went repeating same sequence of moves, that is, draw by the rules Got same repeating sequence at maxLevel=4
So as of now, you pretty much safe playing against AI ;)
Interesting what could be done about that. I mean, I just managed to explain a kid how to win that. How am I to explain it to computer?
|
|
|
Post by Rod on Feb 14, 2021 21:43:49 GMT
Perhaps the value of the king needs to change to get it to want the king. Still not sure why we have 5000 v 7500 and would it play differently with even values or swapped values?
|
|
|
Post by adrian on Jun 11, 2022 21:01:56 GMT
Nicely done. I tried playing black and reached this position where there was no checkmate and white resigned ibb.co/TtGRx0Y
|
|
|
Post by Rod on Jun 12, 2022 6:59:14 GMT
Yeah, it has flaws. It is quite difficult for me to see what the game engine sees as it plays every possible move several plays ahead. I can only assume that it sees an inevitable checkmate and so resigns. Unless a chess guru steps in it is unlikely to get fixed. The code is open for anyone to improve on but it may be simpler starting from scratch.
|
|
|
Post by tsh73 on Jun 12, 2022 8:23:27 GMT
Looking at that position - I would resign too Last black move put white king in check and white queen under attack There is no way to save the queen And with a queen as a difference you might as well just resign on the spot. Probably some threshold got overflown, and program resigned. (by design)
|
|
|
Post by Rod on Jun 12, 2022 13:52:02 GMT
It is probably returning the best play it can make which is loss of king, so not checkmate at the current play but within the next move or so. Anticipated loss of king is interpreted by my code as checkmate/lose/game over. If it had simply printed resign rather than resign / checkmate players may be less surprised. But it isn’t going to get fixed.
But thank you for trying and the feed back.
|
|