There's no need to rely on such ugly brute force memory methods (basically tablebases) for forcing mate with R and K say. My TarraschToyEngine for example has no trouble forcing such mates, I just gave it a little bit of chess knowledge - use the rook to limit the opponent's king to a portion of the board, put your king a knights move away, then force it back further. Once it gets to the edge of the board mate looms up close enough for even the shallow search of a weak engine.
But it would be pointless injecting either type of code into Sargon 1978. It wouldn't be Sargon 1978 anymore. On the other hand introducing transposition tables as a code exo-skeleton would effectively just enable Sargon 1978 to run faster in the endgame (I hope anyway) and calculate all the way to mate. It would be an authentic approach sympathetic to the project as a whole.
But we are going around in circles, and it's no doubt very boring to other people on the forum. I think we should stop.
I'll post again if I do in fact try and do it, I don't know if I can justify putting more weeks of effort into Sargon 1978. I still need to get V1.01 properly released (basically add some timing code to get a better measurement of how much faster Sargon 1978 runs on modern machines).
You do NOT have to work any harder on this project, Sargon Beta is still a great program as it is, and after you add some timing code Sargon will definitively reach an above 1600 ratings. but antway here is where it stand now. I am having a match against Casper rated 1575 by CCRL and so far the score is almost even , but of course it does NOT mean anything unless I run a 1000 games match
Here is the last game where Casper showed Sargon the importance of knowing how to play the opposition.
Anyway the final score was 4 win 3 lost 3 draw in favor of Casper where most of the wins by Casper was due to having
more chess endgame knowledge than Sargon Beta
Mr. Bill Forster even a Master level program without EGTB does NOT know how to use the opposition principle. This position was taken from the previous game of Sargon 1978 Beta playing the Black side posted here from move 81 ...Rg7. Sorry but 81...Rh7 should NOT change the outcome either, and any program rated above 1600 with this basic pawn opposition endgame knowledge should hold any top level engine . If you remove the Roos from both sides this position is a basic pawn opposition endgame.
Uri Blass wrote: ↑Tue Jan 19, 2021 7:29 am
If I understand correctly sargon now only know not to play a move that force a draw by repetition when it has a better alternative.
It does not have draw by repetition knowledge during the search(and note that you do not need hash tables for it but only to see that the line in the search leads to a draw by repetition so you evaluate it as a draw).
This is exactly right.
In general my goal in this project was simply to convert the classic Z80 code to X86 with no emulation or simulation to see how quickly it would run on modern machines. Once I met that goal I started adding things on;
Allowing arbitrary depth instead of the original hardwired limit of depth 6
Give it a UCI interface so it can run as an engine in a GUI
Not just adding the most basic play a game UCI commands, but including arbitrary position setup, optional dynamic depth, time management and most importantly and a real bonus ....
Teasing out the PV and a centipawn evaluation! The original code makes no attempt to collect this information and provide it to the user in any way
Opening up the minimax and alpha-beta algorithms, demonstrating how they work with runtime ascii art "animation" (sort of).
Providing a faithful conversion of the original Z80 code to genuine Z80 mnemonics as a side effect. Retro hackers should prefer using this version to the extant Sargon code which uses odd non-standard third party mnemonics.
All of these extra things are just bonuses though. And none of them require any changes to the core Sargon 1978 chess code.
Similarly, the fact that the engine is perhaps a reasonably fun partner for weak to average players is just a happy accident (another bonus) not really a project goal.
When I realised I could work around the annoying habit of Sargon being too keen to repeat positions, by asking it to try again with the offending repeating move removed from its list of candidate moves - I thought why not? Although this is the closest I have come yet to changing the Sargon 1978 chess code itself. Arguably I may even have stepped over the line (because I had to write some external C code to peer into the implementation and pluck out the offending move).
I am now wondering about supercharging the Sargon 1978 code when there aren't too many pieces on the board. Again I want to leave the chess algorithm in tact - just have it produce the same results faster. In that case it would hopefully be able to calculate for example a 'seize the opposition' move in a simple pawn endgame in much less than 3 minutes. The idea is to add a transposition table cache around the outside, like a kind of code exo-skeleton. I don't yet know if this is even possible. I will have to revisit the tree building order etc. I don't know much about hash caches, I've only ever worked on primitive and retro engines without them. My intuition is that this would only be useful in the ending, when presumably Sargon 1978 is recalculating a comparitive handful of possible positions over and over again. But I can't really judge unless I actually go ahead and try to do it, at the moment I lack the requisite expertise. But it sounds like a potentially fun way of extending the Sargon 1978 project even further.
I believe that Sargon 1978 should be left as is was and any changes such as making it faster or to search deeper, and to give
it more chess knowledge is fine and great idea, but the name should be changed to Sargon 2021
Do NOT worry and be happy, we all live a short life
I wonder if Dan and Kathe are aware of how much interest people still have in their old program. It would be cool to see the source of a later version, though who knows if they would even have the rights to that. I had a lot of fun playing Sargon II on the VIC-20.
tmokonen wrote: ↑Wed Jan 27, 2021 2:30 am
I wonder if Dan and Kathe are aware of how much interest people still have in their old program. It would be cool to see the source of a later version, though who knows if they would even have the rights to that. I had a lot of fun playing Sargon II on the VIC-20.
I wanted to find out what Percentile of Chess players fall between 1450 to 1550 in the World rated similar to Sargon 1978, and it surprised me to find out that 14.54% percent of the World chess players or close to 40,000 players are among this range, which could be satisfied by playing against Sargon 1978, and I would say that at least 50 % of the people who post here on this forum fall under this category
Do NOT worry and be happy, we all live a short life
Uri Blass wrote: ↑Tue Jan 19, 2021 7:29 am
If I understand correctly sargon now only know not to play a move that force a draw by repetition when it has a better alternative.
It does not have draw by repetition knowledge during the search(and note that you do not need hash tables for it but only to see that the line in the search leads to a draw by repetition so you evaluate it as a draw).
I also realized by watching this game between two similar rated engines that when there is only one move, Sargon took 2 minutes to take back the Queen 26. Kxe2. Sargon should be given instructions that when there is only one legal move to execute it immediately and this will save Sargon time for future use. I immediately stopped watching this game since I felt like watching two 7 years old Kids who learned a year or two how to play Chess.
Finally, I tried out the Jupiter emulation you linked to. I played quick a FixedDepth=4 game against Sargon with my Tarrasch GUI (below - Sargon almost demonstrates that my previous assertion that it could never beat me is wrong), then tried to reproduce with the Jupiter Emulator. Everything seems great for a while. As expected the emulator is about one order of magnitude slower than the native code (10 secs v 1 sec at level 4, approx). But sadly, the emulator (reliably/repeatedly) crashes after 14. g3, failing to produce 14... O-O-O. The provenance of the Jupiter code is the same as my code, I used Andre Adrian's transcription as one of my inputs. I might see if I can check my Git logs to see if there's a fix I made somewhere that could account for this.
Hi Bill I was wondering if you can post a game at time control of 120 Minutes using a fixed depth of 7, I would lije to know how many moves Sargon FixedDepth=7 can survive against you, I will also try it and post it here later on.
Do NOT worry and be happy, we all live a short life