Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

klx
Posts: 179
Joined: Tue Jun 15, 2021 8:11 pm
Full name: Emanuel Torres

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by klx »

Daniel Shawul wrote: Thu Sep 02, 2021 10:45 pm There is no safe (sound) pruning algorithm better than alpha-beta, that is what it means to be a mathematically proven optimal algorithm.
It means it can't be improved upon without applying unsound pruning techinque, get it ?
Yes but I am not accomplishing the same as Alpha-Beta. I'm only proving one bound.

For petes sake I already implemented the algorithm yesterday as proof of concept and I guarantee you it works. Does my description not make sense? If so what's wrong with it?

Where is Syzygy I wonder? He was the only one who understood me in my tablebase thread when everyone didn't understand / believe me and it turned out not only I was right but he had independently discovered the same algorithm as me.
[Moderation warning] This signature violated the rule against commercial exhortations.
klx
Posts: 179
Joined: Tue Jun 15, 2021 8:11 pm
Full name: Emanuel Torres

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by klx »

Chessnut1071 wrote: Thu Sep 02, 2021 11:02 pm There are many examples where that fails, did you try that on a few dozen mating puzzles? You may get lucky on a few and get overly optimistic.
No, there can't be. The pruning is safe on one side. If the other side mates, the hypothesis is simply reversed. So it is 100% guaranteed to work.
[Moderation warning] This signature violated the rule against commercial exhortations.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by Daniel Shawul »

Everybody press the "report post" button to report the troll, I did.
klx
Posts: 179
Joined: Tue Jun 15, 2021 8:11 pm
Full name: Emanuel Torres

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by klx »

Huh? I don't know what's with the inhospitable and incredulous attitude. Please, please, read this statement again:

If player A is purely heuristic (e.g. testing a single move at each position), while player B is trying every single move just like in regular Alpha-Beta, and player A still comes out a winner, then we have proven that A will win.

Is this not a true statement? Andrew, you for example must be able to agree with this?? This is the core of my discovery, and it explores just a fraction of the nodes of regular Alpha-Beta. Then I just build on top of that a bit to make it more usable.
[Moderation warning] This signature violated the rule against commercial exhortations.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by Ras »

klx wrote: Thu Sep 02, 2021 10:31 pmand player A still comes out a winner, then we have proven that A will win.
"No sh*t, Sherlock!"(tm)
Rasmus Althoff
https://www.ct800.net
Madeleine Birchfield
Posts: 512
Joined: Tue Sep 29, 2020 4:29 pm
Location: Dublin, Ireland
Full name: Madeleine Birchfield

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by Madeleine Birchfield »

klx wrote: Thu Sep 02, 2021 7:03 am Background
1956. Alpha-Beta was invented by John McCarthy. Over the years, it was further researched by giants such as Donald Knuth.

Fast forward 65 years. Not much has changed. Chess engines are still based on the same technique.

September 1, 2021. Yours truly was out for a morning jog (half marathon), when suddenly a stroke of genius attacked.

There is a fundamental improvement possible in Alpha-Beta search! Easily overlooked, having gone undetected for all these years, but once you see it, it will change the way you think of game search.

The Idea
The basic idea is as follows. In Alpha-Beta, we are proving both an upper and lower bound. Alpha-Emanuel-Beta, in contrast, proves only one bound.

For sake of example, let say we are searching for a mate (but can be any bound). Let us make the hypothesis then, that Black side will win. The genius realization is: we no longer need to analyze every single black move. It is enough to find a single black move at every step that leads to a win. Of course, we still need to try all white moves in response, but due to cut-offs they will generally be few.

What we have obtained now, is a mind-boggling exponential reduction in number of nodes visited.

Emanuel
There is but one complication. Our search may show that Black side loses, while in fact there were black moves leading to a win that we never explored. To deal with this, we define a variable `long Emanuel`, where we only try black moves with score above this variable. Emanuel can then be progressively lowered, so that we start with a big Emanuel, and if the hypothesis fails, we try a smaller Emanuel. More specifically then -- how do we choose Emanuel? Well, it depends on the scoring. If we use history heuristics, we can use a multiple of the maximum or sum of all heuristics.

Concurrency
Now, you may think, if the hypothesis fails, and we need to re-search for the other side to win, or another Emanuel, it will waste time. Well, not so! Unlike regular Alpha-Beta search, Alpha-Emanuel-Beta is very amenable to parallelizing; we can start these searches in separate threads and since they're completely independent there is close to 100% multithreading efficiency!

Epilogue
I am releasing this idea in the public domain, for anyone to implement and profit from. How will we look back at this discovery in 65 years? Only time will tell.
Can't wait for Emanuel's Neural Networks - Enormous Improvements over NNUE and deep CNNs.
Chessnut1071
Posts: 313
Joined: Tue Aug 03, 2021 2:41 pm
Full name: Bill Beame

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by Chessnut1071 »

klx wrote: Thu Sep 02, 2021 11:04 pm
Chessnut1071 wrote: Thu Sep 02, 2021 11:02 pm There are many examples where that fails, did you try that on a few dozen mating puzzles? You may get lucky on a few and get overly optimistic.
No, there can't be. The pruning is safe on one side. If the other side mates, the hypothesis is simply reversed. So it is 100% guaranteed to work.
Obviously you haven't tried that. If you prune, I can always find a mating sequence that will get past your algorithm, even if it's low probability. Trust me, I use 2,560 mating puzzles and there is very few systems I haven't tried yet. Alpha-beta is the only one that correctly solves the least move checkmate on every one. The one metric that you can prune is six or more king moves on the last move for the losing side. Other than that every other eval failed at least twice.
klx
Posts: 179
Joined: Tue Jun 15, 2021 8:11 pm
Full name: Emanuel Torres

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by klx »

Ras wrote: Fri Sep 03, 2021 1:23 am
klx wrote: Thu Sep 02, 2021 10:31 pmand player A still comes out a winner, then we have proven that A will win.
"No sh*t, Sherlock!"(tm)
Ok.. so you understand my algorithm? Can you tell the others?
Chessnut1071 wrote: Fri Sep 03, 2021 6:13 am Obviously you haven't tried that. If you prune, I can always find a mating sequence that will get past your algorithm, even if it's low probability. Trust me, I use 2,560 mating puzzles and there is very few systems I haven't tried yet. Alpha-beta is the only one that correctly solves the least move checkmate on every one.
Oh ok, no as I wrote above there is no guarantee of proving the bound in the minimum number of moves. But that's kind of a niche use case. More often you want to know one player is guaranteed a mate or certain piece advantage, not whether it happens in 5 or 7 moves.
[Moderation warning] This signature violated the rule against commercial exhortations.
AndrewGrant
Posts: 1750
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by AndrewGrant »

klx wrote: Fri Sep 03, 2021 6:46 am
Ras wrote: Fri Sep 03, 2021 1:23 am
klx wrote: Thu Sep 02, 2021 10:31 pmand player A still comes out a winner, then we have proven that A will win.
"No sh*t, Sherlock!"(tm)
Ok.. so you understand my algorithm? Can you tell the others?
Chessnut1071 wrote: Fri Sep 03, 2021 6:13 am Obviously you haven't tried that. If you prune, I can always find a mating sequence that will get past your algorithm, even if it's low probability. Trust me, I use 2,560 mating puzzles and there is very few systems I haven't tried yet. Alpha-beta is the only one that correctly solves the least move checkmate on every one.
Oh ok, no as I wrote above there is no guarantee of proving the bound in the minimum number of moves. But that's kind of a niche use case. More often you want to know one player is guaranteed a mate or certain piece advantage, not whether it happens in 5 or 7 moves.
How about you take this idea, and add it to an existing engine, to demonstrate that 1. It works, and 2. Its not terrible
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )
klx
Posts: 179
Joined: Tue Jun 15, 2021 8:11 pm
Full name: Emanuel Torres

Re: Alpha-Emanuel-Beta Search -- Enormous Improvement of Alpha-Beta!

Post by klx »

AndrewGrant wrote: Fri Sep 03, 2021 6:51 am How about you take this idea, and add it to an existing engine, to demonstrate that 1. It works, and 2. Its not terrible
Sure, I can do it tomorrow.

Emanuereal.
[Moderation warning] This signature violated the rule against commercial exhortations.