I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by JimmyRustles »

:)

Image
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by zenpawn »

Very cool. :)
Erin Dame
Author of RookieMonster
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by amanjpro »

This assumes a very good move ordering... I hope my engine is somewhere in between the two :D
User avatar
j.t.
Posts: 268
Joined: Wed Jun 16, 2021 2:08 am
Location: Berlin
Full name: Jost Triller

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by j.t. »

amanjpro wrote: Sun Jul 04, 2021 1:30 am This assumes a very good move ordering... I hope my engine is somewhere in between the two :D
On reddit he mentioned this uses no move ordering at all, which I find impressive. How impressive will depend on the concrete position this was generated from.
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by amanjpro »

j.t. wrote: Sun Jul 04, 2021 2:45 am
amanjpro wrote: Sun Jul 04, 2021 1:30 am This assumes a very good move ordering... I hope my engine is somewhere in between the two :D
On reddit he mentioned this uses no move ordering at all, which I find impressive. How impressive will depend on the concrete position this was generated from.
It is indeed impressive
Vinvin
Posts: 5299
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by Vinvin »

That remember me this video :
Comparison : Minimax vs A-B + move ordering
pedrojdm2021
Posts: 157
Joined: Fri Apr 30, 2021 7:19 am
Full name: Pedro Duran

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by pedrojdm2021 »

Holy ... that is amazing! i always wanted to do something like that, great work! :D
User avatar
hgm
Posts: 28396
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by hgm »

j.t. wrote: Sun Jul 04, 2021 2:45 am
amanjpro wrote: Sun Jul 04, 2021 1:30 am This assumes a very good move ordering... I hope my engine is somewhere in between the two :D
On reddit he mentioned this uses no move ordering at all, which I find impressive. How impressive will depend on the concrete position this was generated from.
That something is mentioned doesn't mean it is true.

The diagram shows a tree where the best move is searched first, so that all other moves could be refuted by a single move, and that this refutation was found on the first try. The odds that this would happen with random move ordering are less than astronomically small.

Unless, of course, all moves are really equivalent. Which is what you would get when you evaluate every position as 0. Then every order will automatically have the/a best move fist in every possible permutation of the moves, as every move is the best one. But then they are ordered by score.
Rein Halbersma
Posts: 751
Joined: Tue May 22, 2007 11:13 am

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by Rein Halbersma »

hgm wrote: Sun Jul 04, 2021 8:57 am
j.t. wrote: Sun Jul 04, 2021 2:45 am
amanjpro wrote: Sun Jul 04, 2021 1:30 am This assumes a very good move ordering... I hope my engine is somewhere in between the two :D
On reddit he mentioned this uses no move ordering at all, which I find impressive. How impressive will depend on the concrete position this was generated from.
That something is mentioned doesn't mean it is true.

The diagram shows a tree where the best move is searched first, so that all other moves could be refuted by a single move, and that this refutation was found on the first try. The odds that this would happen with random move ordering are less than astronomically small.

Unless, of course, all moves are really equivalent. Which is what you would get when you evaluate every position as 0. Then every order will automatically have the best move permutation of the moves will automatically have the best one first, as every move is the best one. But then they are ordered by score.
The Knuth Moore paper that proved that perfectly ordered ab-searches have a branching factor b^(1/2) for a minimax tree of branching factor b, also showed that randomly ordered ab-searches have branching factor b^(3/4). So instead of searching 2x deeper you still search 4/3 deeper.
chrisw
Posts: 4648
Joined: Tue Apr 03, 2012 4:28 pm
Location: Midi-Pyrénées
Full name: Christopher Whittington

Re: I generated a tree diagram of a minimax search versus an alpha beta search. Interesting to see how much gets pruned.

Post by chrisw »

hgm wrote: Sun Jul 04, 2021 8:57 am
j.t. wrote: Sun Jul 04, 2021 2:45 am
amanjpro wrote: Sun Jul 04, 2021 1:30 am This assumes a very good move ordering... I hope my engine is somewhere in between the two :D
On reddit he mentioned this uses no move ordering at all, which I find impressive. How impressive will depend on the concrete position this was generated from.
That something is mentioned doesn't mean it is true.

The diagram shows a tree where the best move is searched first, so that all other moves could be refuted by a single move, and that this refutation was found on the first try.
Look a little more carefully and you’ll observe this is not in fact true.

The odds that this would happen with random move ordering are less than astronomically small.

Unless, of course, all moves are really equivalent. Which is what you would get when you evaluate every position as 0. Then every order will automatically have the/a best move fist in every possible permutation of the moves, as every move is the best one. But then they are ordered by score.