MK,

You wrote "Not the "equity" but the "equity difference" between the "from" 
position and the "to" position."

I can't see any difference in outcome between selecting the play that maximises 
the equity of the move made, and maximising the equity gain between the current 
position and the new position. The latter option just adds an unnecessary 
subtraction step, so I doubt that's how it's programmed.

I agree that the Temp Map you posted is showing the equity with doubles 
allowed. I've put then into a spreadsheet so you can see the calculations. 
https://docs.google.com/spreadsheets/d/17XFvQPvWNqGMRgZScl2qcTW2ovNeCISq/edit?usp=sharing&ouid=117015456330598325471&rtpof=true&sd=true

The equity of 31 after returning to the opening position is +0.219. The equity 
after an opening 31 is also +0.219.  I conclude that there is no problem with 
the equity calculation that would affect how gnubg plays.

The temp map was a later addition to gnubg, so I don't think it's used in the 
luck calculation. Even if the luck calculation is down as per the temperature 
map, and there is an error in the luck calculation of the opening roll, it 
won't permeate through to other rolls. The luck calculation is based on the 
actual roll compared to the other 21 (14 in the opening) possible rolls.

The luck of 31 after returning to the opening position is +0.112. It's a good 
roll but not as good as any double. It's just above the average of +0.107. The 
worst roll is 14 at -0.113.
The luck of an opening 31 is +0.219. It's a great roll, compared to the average 
of 0.000. The worst roll is 14 at -0.219.

You want to make a distinction between the game not started being on roll 
before the move. For example, if you tossed a coin to see who started and then 
the winner rolls any non-double and plays it.
Then winning the opening roll would show a luck of +0.052.
The luck of an opening 31 is +0.167.
This adds to +0.219, the same as above.

This all seems consistent to me.

Your argument about a fallacy appears to be a semantic one. When I say, "the 
equity before the opening roll is zero", I'm aware that the opening roll also 
defines who rolls first, and I'm using it in that context.

If the opening roll were a coin toss, I wouldn’t speak in the same terms. I 
would say, "the equity before the toss is zero" because that's the average 
equity of all 30 possible outcomes (player 1 wind the toss & rolls, player 2 
wins the toss and rolls). I would also say, "the equity having won the toss is 
+0.052 before rolling" because that's the average equity of the remaining 15 
possible outcomes.

Do you agree with the preceding paragraph?

Knowing the absolute equity is only useful for cube actions, and since the 
rules prohibit doubling on the opening roll, it's not very useful to me  to 
make a distinction.

"In fact, I'd argue that with the cube centered, you should be allowed to 
double if you want before you open your eyes but this is a whole different 
subject and for one of the experiments that I have done and will share soon."

I wouldn’t double.  As shown by the rollouts, I'd be giving up 0.36 points per 
game, on average. Even if I knew you would roll 66, I would still take, because 
the equity of -0.276 * 2 is still better than giving up a whole 1.000 point.

A couple of final points.

I'm sure the match equity tables are calculated correctly. The starting player 
of any subsequent game is equally likely, so the equity of each game starts at 
zero.

I did read some of the old rgb threads.  They descended into rudeness and I 
lost interest.

For some reason, your last 2 messages got caught in my spam filter, hence the 
late reply.


Regards,
Ian

-----Original Message-----
From: MK <playbg-...@yahoo.com>
Sent: Wednesday, March 6, 2024 9:35 PM
To: Ian Shaw <ian.s...@riverauto.co.uk>; bug-gnubg@gnu.org
Cc: Philippe Michel <philippe.mich...@free.fr>
Subject: Re: Interesting question/experiment about value of cube ownership

On 3/4/2024 5:26 AM, Ian Shaw wrote:

Since at least you care to continue this discussion, I will invest more of my 
time and effort mainly for the sake of improving GnuBG.

> Sorry, MK, I didn't read back over the old threads,

It was in my a previous post in this current thread here but it's no big deal. 
However, if you are serious about discussing this issue, which one of many 
related ones, you really need to read at least this thread in RGB (which I had 
mentioned in my last post):

https://groups.google.com/g/rec.games.backgammon/c/QU1jM9aatO0/m/peIBhLJNAgAJ

There is a lot in there, including a bug that I had pointed out in "analysis.c" 
that had been there since 2014, which is still there. See lines 243-246 in 2022 
and 272-275 in current version:

https://cvs.savannah.gnu.org/viewvc/gnubg/gnubg/analysis.c?revision=1.241&view=markup

https://cvs.savannah.gnu.org/viewvc/gnubg/gnubg/analysis.c?revision=1.263&view=markup

Too bad that the development/maintenance team isn't hearing me.

> You asked earlier about the GNUBG ID I used. It was:
> 4HPwATDgc/ABMA:cAkAAAAAAAAA This is the ID obtained after the sequence
> I suggested:   4HPwATDgc/ABMA:cAkAAAAAAAAA They are identical, so
> there is no indication in the ID to indicate whether it is the opening roll.

Let's clarify things. The starting position when you open GnuBG is 
4HPwATDgc/ABMA:cAgAAAAAAAE at which analyze functions aren't yet available. 
4HPwATDgc/ABMA:cAkAAAAAAAE (g changed to k) sets the game started flag (with 
nothing happened yet) and analyze functions become available. 
4HPwATDgc/ABMA:cAgAAAAAAAA is the same position with the stupid Jacoby on :( 
Sorry for not being more careful. It makes a slight -0.0075 difference in the 
average equity of the position (+0.0989 vs +0.1064).

> The Contact Net does not have an input for Opening Roll, which makes
> sense. The bot plays by maximizing the equity of the next position.
> The opening layout – with doubles prohibited - is never the next
> position.

Not the "equity" but the "equity difference" between the "from"
position and the "to" position.

The starting position has an average equity just like any other position except 
that it has two different equities depending on its initial and subsequent 
(recycled) occurrences. This is the issue here.

> Comparing evaluation, Rollout as Normal Position, Rollout as Initial
> Position, we can see that the evaluation is close to the value of the
> rollout.

"Close" but not the "same" because the evaluation is based on erroneously 
including doubles in the average position equity even in the initial occurrence 
of the starting position! See the bug in the code above, which is only part of 
the reason.
(Also see the attached temp map and eval images).

> The rollout as the initial position is lower since it doesn’t include
> those useful doubles.

That's why I had asked if bot's auto-playing was the same as roll-outs...

If you paste the 4HPwATDgc/ABMA:cAkAAAAAAAE and look at the temperature map, 
you can see that the average position equity of +0.1064 includes doubles and is 
almost twice what it should be +0.0521 (a difference of +0.0543).

This makes all subsequent equity and luck calculations wrong!
since they are all based on the equity difference between two positions, before 
and after what is rolled (and how it's played).

If a bot is claimed to be superior to humans, it can't contain such 
inaccuracies...

> I don’t think the value of 0.36 ppg for cube ownership that we both
> obtained is a "coincidence". I think it's evidence that your script is
> a good emulation of a rollout.

It wouldn't be a coincidence for it to be "close enough", based the above 
facts, but it being exactly the same must have been a coincidence.

> If you think 0.36 is inaccurate, I’m open to persuasion. Do you have a
> theory as to why it’s wrong, or what you think the correct value is?

I believe I have provided enough factual evidence above...

> Regarding the equity at the beginning of the game, I’m not aware of
> any “age-old fallacy”. It's well established that winning the opening
> roll confers an advantage. I don’t think there's any theory that says
> the equity (between equal opponents) is non-zero before the opening
> roll.

There wasn't/isn't. That's what I'm calling "a fallacy" because the equity 
between equal players before the "opening roll" isn't zero.

You all confuse "before the game starts" and "before the opening roll" because 
in Gamblegammon (BG variant played with the cube), deciding who goes first and 
the opening roll happen simultaneously.

Imagine we are equal players wanting to play just one game. You roll your die 
with your eyes closed and ask who won the opening roll. I say you did. At that 
point you are on roll but haven't rolled the opening roll yet, (your eyes are 
still closed and you don't yet know the numbers lying on the board). For having 
won the opening roll, you already accrued an average +0.0521 equity.

In fact, I'd argue that with the cube centered, you should be allowed to double 
if you want before you open your eyes but this is a whole different subject and 
for one of the experiments that I have done and will share soon.

So, now you open your eyes and see your "opening roll" which just happened now, 
after the game had actually started prior to it...

> Indeed, the construction of most match equity tables is based on the
> equity at the start of the game being zero (unless they are assuming
> unequal players).

Well, then, they must be all wrong. The false argument that was offered in the 
above linked RGB thread was that in the long run both sides will win the 
opening roll an equal number of times and thus their equity difference is zero, 
which is again the fallacy.

Calculating the average equity after one million trials isn't the same thing as 
assuming that two equal players will play a million games and base equity 
tables on that. You have to take each game separately, as though it will be the 
only game played.
In that case the equity gained by winning the opening roll makes a difference. 
This is my argument. Anyone should feel free to provide argument to the 
contrary.

MK

  • RE: Interesti... Bug reports for and general discussion about GNU Backgammon.
    • Re: Inte... MK
      • Re: ... Bug reports for and general discussion about GNU Backgammon.
        • ... MK
          • ... MK
          • ... Bug reports for and general discussion about GNU Backgammon.
            • ... MK
            • ... MK
            • ... Bug reports for and general discussion about GNU Backgammon.
            • ... Murat K
            • ... Bug reports for and general discussion about GNU Backgammon.
            • ... MK
            • ... Bug reports for and general discussion about GNU Backgammon.
            • ... MK
            • ... Bug reports for and general discussion about GNU Backgammon.
            • ... MK
            • ... Bug reports for and general discussion about GNU Backgammon.
            • ... Bug reports for and general discussion about GNU Backgammon.
            • ... MK

Reply via email to