1.g4 opening is losing?

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

Moderators: hgm, Rebel, chrisw

Zenmastur
Posts: 919
Joined: Sat May 31, 2014 8:28 am

Re: 1.g4 opening is losing?

Post by Zenmastur »

jdart wrote: Tue Jan 14, 2020 3:48 pm
Sounds like a weak move selection algorithm, or not using all the knowledge you have available, or too high expectation of the learning rate, or a combination of all three.

I'm kind of curious what was the time controls you were using? I think this plays a huge role in learning rate per unit time spent.
I didn't get very far with this but I was using a fairly long time control. Shorter TC would give less of a draw rate and faster learning but also I think more randomness in the results.
Well...

Did you start with an empty book and have the program build it from scratch? If you did, then using very very short time controls to start with is in order for two reasons. The first is you need to have the program play as many games as possible to fill the book with leaf nodes. This takes a while and is best done without a GUI involved. A GUI will slow things down by an order of magnitude. SF with a 1 ply search is much greater than 1200 ELO better than a random player. Unknown how much greater, since I was never able to get a draw with a random player. This is both fast enough and strong enough to fill the book with non-random leaf nodes pretty quickly. How quickly depends on how deep a book you want AND the rules for adding new nodes. With this short of a time control you “could” add all legal moves less than a given depth from the root. This is a very loose add policy and something like the top 3 to 5 moves will bloat the book less after a depth of 2 to 4 ply's has been reached. After you have a reasonable size book you can start ramping up the search depth of your test games and change the rules for adding nodes to something a little less loose, like top 2 move so you always have at least one alternative move at each node. At search depth of between 15 and 23 plies you should have a reasonable book that you can build on with more “normal” time controls.

The problem is, I think even in the best case, you need a very large number of games to get convergence. In a lot of cases one move scores 60% and another 55%. That is significant but getting to the point where you see that difference is going to take time. You could also optimize for scores out of the search, which I think a lot of people have done, but IMO that is less reliable. For example, something like the Ruy Lopez Marshall Gambit where Black is a pawn down may give you minus scores, but most of the endgames are drawn.
While it's true that it's somewhat less reliable it's also orders of magnitude faster at least to start with. If your building from scratch or just adding new nodes this should be the preferred method until you have enough experience to use a better method. So all your leaf nodes should start out being selected by search only. Only after some number of games from that leaf node have been played should you switch to some other method.

Trying to build a learning book from scratch ( or even modifying a standard book ) by using only long time control games is way beyond most peoples available computing power. i.e. there is no reason to waste large amounts of computing time on long time control games for sub-par / losing moves when most can be proved to be losing with much shorter time controls. Only after these (most) moves have been ferreted out at shorter time controls should you move to longer time controls. Otherwise you waste huge amounts of computer time.

Does than make any sense to you?

Regards

Zenmastur
Only 2 defining forces have ever offered to die for you.....Jesus Christ and the American Soldier. One died for your soul, the other for your freedom.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: 1.g4 opening is losing?

Post by jdart »

The book was "seeded" with a set of a-priori move statistics. So not starting from zero. My idea was I could use this as a book that added some learning (both online and offline) to what the book currently had. Since the book already is decently tuned, adding very short-time control games or shallow search results to it did not make sense to me. All that said, your comments are correct and the learning rate was going to very low.
OneTrickPony
Posts: 157
Joined: Tue Apr 30, 2013 1:29 am

Re: 1.g4 opening is losing?

Post by OneTrickPony »

Newest T60 Leela network gives eval of -73% for after 1 Million node search (a bit over a minute on 2080ti).
If 1.g4 is losing it's interesting to ponder if openings like Benoni or Mar del Plata King's Indian variation are losing as well. If you play around a bit you get around 65% for white in those. Not quite as bad as 1.g4 but in the "maybe theoretically losing" ballpark in my view.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: 1.g4 opening is losing?

Post by jdart »

OneTrickPony wrote: Wed Jan 15, 2020 8:25 pm Newest T60 Leela network gives eval of -73% for after 1 Million node search (a bit over a minute on 2080ti).
If 1.g4 is losing it's interesting to ponder if openings like Benoni or Mar del Plata King's Indian variation are losing as well. If you play around a bit you get around 65% for white in those. Not quite as bad as 1.g4 but in the "maybe theoretically losing" ballpark in my view.
My question would be: what do results of a self-play match look like?
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: 1.g4 opening is losing?

Post by Ovyron »

Yeah, suppose 1.g4 is actually a draw, and you play a self-play match and get that 73% of games are indeed won. What you'll find is that in those games white played losing moves that it didn't play in the other 27%, so you create an opening book and forbid the engine to play those losing moves. What statistics do you get now?

If they're <73% now then it means the initial 73% was wrong and it should have been this new, more accurate value.

If the initial self-play match gives some 95% black wins then the percentage is also wrong.

That's why I'm not a fan of using %s instead of scores, those percentages mean nothing or they're inaccurate after you block the losing side's blunders (suppose there's only 1 line that draws, then it'd show high percentage of losing, except that you can play this drawing move every time and draw all the games, so the % chance of playing a losing move is irrelevant.)
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: 1.g4 opening is losing?

Post by zullil »

OneTrickPony wrote: Wed Jan 15, 2020 8:25 pm Newest T60 Leela network gives eval of -73% for after 1 Million node search (a bit over a minute on 2080ti).
If 1.g4 is losing it's interesting to ponder if openings like Benoni or Mar del Plata King's Indian variation are losing as well. If you play around a bit you get around 65% for white in those. Not quite as bad as 1.g4 but in the "maybe theoretically losing" ballpark in my view.
Lc0 (Network 384x30-t40-1573) with 100M nodes has 2. h3 as the top choice following 1. g4 d5. It considers 2. g5 to be second best, though with the smallest probability of losing, at just 56.4%.

Nodes: 100M, N/s: 13.9k, Time: 1h 58m (limit met)

28.4% h3 h5 gxh5 e5 c3 Qh4 d3 Nc6 Nd2 Nf6 Ngf3 Qxh5 e4 Bg4 Rg1 Bxf3 Nxf3 dxe4 dxe4 Nxe4 Rg4 Qf5 Qe2 Nf6 Rg5 Qe6 Nxe5 Nh7 Nxc6 Nxg5 Bxg5 Qxe2+ Bxe2 f6 Bf4 bxc6 Bxc7 Bc5 Bg4 Bb6 Bg3 g6 Kf1 Rd8 a4 Rh7 Bf3 Bc7 Bxc6+ Kf8 Kg2 f5 a5 f4 Bh2 Rd3 Bf3 Re7 Ra4 g5 Rc4 Bxa5 h4 gxh4 Rxf4+ Rf7 Bh5 Rxf4 Bxf4 Bb6 Be2 Rd5 f3 a5 Kh3 Bd8 b3 Be7 c4 Rd8 c5 Rc8 Bh6+ Kf7 Bc4+ Kg6 Be3 Bxc5 Bd2 Bb4 (N: 53.5M, WDL: 137 295 568, P: 24.81%)

27.3% g5 e5 d4 exd4 N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4+ Kb1 Bxd4 Qxd4 Qxh2 c6 Qxf2 Rxe4 Qf5 cxb7+ (N: 2.3M, WDL: 135 270 595, P: 9.25%)
23.3% e4 e5 h3 h5 Bg2 dxe4 gxh5 Nf6 Nc3 Nc6 Nxe4 Be6 d3 Qd7 Be3 O-O-O a3 Nxh5 Ng5 Nf4 Bxf4 exf4 Qd2 Bd5 Bxd5 Qxd5 (N: 60.1k, WDL: 118 230 652, P: 2.96%)

17.3% d4 Bxg4 c4 e6 cxd5 exd5 Nc3 c6 Qb3 Qb6 f3 Be6 Nh3 Na6 Nf4 Qxb3 axb3 Nb4 Nxe6 fxe6 Kd1 Nf6 Bd2 Kf7 Na4 (N: 20.9k, WDL: 88 170 742, P: 2.55%)

16.8% Bh3 h5 g5 Bxh3 Nxh3 Qd7 Ng1 e5 d4 exd4 Nf3 c5 c3 dxc3 Nxc3 d4 Ne4 Nc6 Qd3 O-O-O Bd2 Qd5 Rc1 (N: 18.6k, WDL: 98 140 762, P: 2.39%)

15.7% d3 Bxg4 c4 dxc4 Qa4+ c6 Qxc4 Nf6 Nc3 Nbd7 Bh3 Bxh3 Nxh3 h6 Ng1 g6 Nf3 Bg7 Rg1 Qb6 (N: 17.7k, WDL: 82 150 768, P: 2.49%)

15.1% c3 Bxg4 Qb3 Nf6 Qxb7 Nbd7 h3 Bh5 Nf3 e5 d4 Bxf3 exf3 Bd6 dxe5 Nxe5 f4 Ned7 Bg2 O-O (N: 16.3k, WDL: 82 137 781, P: 2.43%)
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: 1.g4 opening is losing?

Post by Ovyron »

Realistically white isn't going to win any game, so do we get better %s if we take out possible white wins from the computation?
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: 1.g4 opening is losing?

Post by zullil »

Ovyron wrote: Thu Jan 16, 2020 12:39 am Realistically white isn't going to win any game, so do we get better %s if we take out possible white wins from the computation?
Well, the conditional probability that White draws with 2. g5 given that White doesn't win seems to be 0.326 / (0.326 + 0.564) = 0.366. You're welcome to make analogous calculations and compare. :D
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: 1.g4 opening is losing?

Post by jp »

zullil wrote: Thu Jan 16, 2020 12:36 am Lc0 (Network 384x30-t40-1573) with 100M nodes ... following 1. g4 d5.

Nodes: 100M, N/s: 13.9k, Time: 1h 58m (limit met)

28.4% h3 h5 gxh5 e5 c3 Qh4 ... (N: 53.5M, WDL: 137 295 568, P: 24.81%)
27.3% g5 e5 d4 exd4 Nf3 c5 ... (N: 28.8M, WDL: 110 326 564, P: 5.08%)
27.2% c4 e5 Bg2 dxc4 Nc3 h5 gxh5 Rxh5 ... (N: 9.8M, WDL: 126 292 582, P: 4.76%)
27.0% Bg2 Bxg4 c4 c6 Qb3 e6 Qxb7 Nd7 ... (N: 5.4M, WDL: 108 324 568, P: 19.98%)
27.0% e3 e5 d4 exd4 exd4 Qe7+ Be3 Qe4 ... (N: 2.3M, WDL: 135 270 595, P: 9.25%)
These percentages are all so close that they are surely well within the confidence intervals.

I feel favorable towards c4 and Bg2, instead of going down fussing about that g4 pawn.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: 1.g4 opening is losing?

Post by Ovyron »

zullil wrote: Thu Jan 16, 2020 1:02 am Well, the conditional probability that White draws with 2. g5 given that White doesn't win seems to be 0.326 / (0.326 + 0.564) = 0.366. You're welcome to make analogous calculations and compare. :D
Thanks, but then what do I do to transform this 0.366 into some percentage to compare it to the one with draws?