Permanent Hash/Position Learning

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Permanent Hash/Position Learning

Post by Rebel »

Ovyron wrote: perhaps Rebel is right in that the easier approach is just learning from what other programs are already playing, instead of playing the games yourself...
Or both :wink:

And you don't need a GUI for that, just an util that parses PGN and update the learning file (book).
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Permanent Hash/Position Learning

Post by Ovyron »

Rebel wrote:Or both :wink:

And you don't need a GUI for that, just an util that parses PGN and update the learning file (book).
We agree on that :) - I think an adapter could do the job, so for instance, RebelUCI.exe would take care of the learning and book playing before launching ProDeo when a novelty is played, then ProDeo's native learning takes over.

But wb2uci.eng would allows us to have [OPTIONS] Program = some other engine so that any engine can use this kind of learning.

What we'd need is the adapter to parse the PGN and update the learning book after each game is played, automatically.

Other similar projects that could work for this are Polyglot, UCI2WB, InBetween and Aquarium's CTG book adapter, just some program that stands between the GUI and engine and learns what openings to play, then fires up the engine when out of data.

Note that RomiChess already parses PGNs and updates its learn file, so it would be as easy as having another engine edited to make use of this learn file, but we're back to the problem of having every single programmer having to add access to the learn file to their engine.
User avatar
Ponti
Posts: 493
Joined: Wed Mar 15, 2006 6:13 am
Location: Curitiba - PR - BRAZIL

Re: Permanent Hash/Position Learning

Post by Ponti »

Ovyron wrote:Rodolfo, for elo points I think RomiChess's method is the best, as it eventually can learn how to beat anyone from a given position, doing it from starting position would just take a while...

The problem is Romi reaching won positions and losing them, then avoiding them because it lost...
Please define what is a won position .
Is it an op. book position with +/- eval or +- or +0.9 or... ?
What is a won position for an engine might not be a won position for another engine (as you said above).
A won tablebased ending position is always won if the engine can access the tablebase.
A won "hashtabled" middlegame position is always won if an engine can access the hashfile.
Well, that is "solving chess", isn´t it ? Please don´t solve it. Chess is so beautiful !
:cry:
A. Ponti
AMD Ryzen 1800x, Windows 10.
FIDE current ratings: standard 1913, rapid 1931
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Permanent Hash/Position Learning

Post by Ovyron »

Ponti wrote:Please define what is a won position .
Down the rabbit hole, definitions have no ending. Define "define" :P

But I shall try, what I mean by a won position is a position where most engines would defeat the opposition. It is a blurry concept, but it's the kind of thing you know when you see it.

A clean definition is one you'd resign, because you see no hope of saving the game.

Here's an example from a recent game I won at FICGS:

[D]2r3k1/p5qp/1pN1P3/1P1p1QbP/3P1p2/P4R2/8/5K2 b - -

This is a clearly won position.

I spent several hours per move in the positions leading to it, and have achieved certainty that white wins. My opponent apparently reached the same conclusions (0% chance of saving the game and resigning.)

So I am certain that I could win from that position against God, if she existed and came down from the heavens to play me. I could beat Eros Riccio or any other Correspondence chess champion in history from that position. I could beat Alpha Zero, the entire world if they used all the planet's resources to defend it, and if some time traveler from a distant future was able to use 32men tablebases and whatever future method that can exist for chess analysis, and communicated with me to try to defend the position, I could also beat them with ease.

This position is nothing special, it's just some complex version of King versus Queen and King, where any experienced player can also win against any chess entity.

So the question is, was I able to do this from 1 move before this position?

Yes.

What about 2 moves before this position?

Yes.

What about 6 moves before this position?

Yes.

The game has been won by white for a while. I'm not even sure my opponent played the strongest defense.

However, there's some point at which I'm not sure anymore, and as I said, it's kind of blurry. I could probably force my way to similar won positions, but perhaps black has some defensive resource I am missing.

I'm not certain I can win from this position:

[D]3qr2k/pb5p/1p6/1P1pPQbP/3P1p2/P4R2/1N6/2R4K b - -

However, I could gain certainty if I analyzed it for a few hours and killed all the holes, but I wouldn't know unless I tried.

In my example, Romi would go and lose from a similar position against a stronger opponent, and would avoid this winning position in the future.
Ponti wrote:Well, that is "solving chess", isn´t it ? Please don´t solve it. Chess is so beautiful !
It may not be as hard as you think. I actually think I have found a position in the Marshall Counter-Attack that is completely drawn and white can't do anything about it, though I was proven wrong in the past on the Petroff, I'll have to play this variation against someone very strong in the future, though, agaisnt ICCF opponents 200 elo stronger than me, my openings have proven solid.

You may want to contact Kreuzfahrtschiff on Rybka forum, he claims that he can solve chess on the fly at correspondence time controls, so he already plays perfect chess, and nobody has been able to disprove him yet.

Sadly, the perfect chess game is a draw, you can go near the edge of the trees to try to make the opponent trip up and lose, but if they don't blunder, there's nothing you can do.

Your best chance is that your opponent dies and you beat them on the clock :P - which is becoming a poor taste joke considering opponents I've played in the past have in fact died...