Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Catch a wave and you're sitting on top of the world. -- The Beach Boys


interests / rec.games.backgammon / Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

SubjectAuthor
* Why I was unsurprised by Tim's surprising example of one of XG's surprisespeps...@gmail.com
+* Re: Why I was unsurprised by Tim's surprising example of one of XG'sTimothy Chow
|+* Re: Why I was unsurprised by Tim's surprising example of one of XG'sah....Clem
||`- Re: Why I was unsurprised by Tim's surprising example of one of XG's surprisespeps...@gmail.com
|`* Re: Why I was unsurprised by Tim's surprising example of one of XG's surprisesMK
| `- Re: Why I was unsurprised by Tim's surprising example of one of XG'sTimothy Chow
`- Re: Why I was unsurprised by Tim's surprising example of one of XG's surprisesMK

1
Why I was unsurprised by Tim's surprising example of one of XG's surprises

<82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9837&group=rec.games.backgammon#9837

  copy link   Newsgroups: rec.games.backgammon
X-Received: by 2002:a05:620a:17a0:b0:6cd:a185:131d with SMTP id ay32-20020a05620a17a000b006cda185131dmr14018604qkb.759.1663062706650;
Tue, 13 Sep 2022 02:51:46 -0700 (PDT)
X-Received: by 2002:a05:6870:9a1b:b0:128:c95:efa2 with SMTP id
fo27-20020a0568709a1b00b001280c95efa2mr1308132oab.6.1663062706365; Tue, 13
Sep 2022 02:51:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: rec.games.backgammon
Date: Tue, 13 Sep 2022 02:51:46 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=217.155.59.144; posting-account=X1j9wgoAAADLt4UnZrIneT3jwl9HvLMd
NNTP-Posting-Host: 217.155.59.144
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
Subject: Why I was unsurprised by Tim's surprising example of one of XG's surprises
From: pepste...@gmail.com (peps...@gmail.com)
Injection-Date: Tue, 13 Sep 2022 09:51:46 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1954
 by: peps...@gmail.com - Tue, 13 Sep 2022 09:51 UTC

In another thread, Tim gave an example of an XG error that XG makes in
a particular position (probably class of position) intermittently.
However, the bug affects XG's evaluations only, not its play.

As a python coder (among other things), I found another example of
unpredictable behaviour. This behaviour changed between runs of exactly
the same codebase on exactly the same machine.

What the code does (as part of a test) is to take the mean of several
instances of 0.1. Sometimes, it correctly calculates the mean to be 0.1 but sometimes it calculates the mean to be (approx) 0.1 - 1e-17 (in other words
0.0999999999.....(I'm too lazy to count out all the 9s.))

So, at least in python, we can get undefined behaviour very readily with
very simple examples.
I very much doubt that this would happen in C++ where arithmetic
processes are much better documented and standardised.

Paul

Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

<tfpte5$2j33b$1@dont-email.me>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9839&group=rec.games.backgammon#9839

  copy link   Newsgroups: rec.games.backgammon
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: tchow12...@yahoo.com (Timothy Chow)
Newsgroups: rec.games.backgammon
Subject: Re: Why I was unsurprised by Tim's surprising example of one of XG's
surprises
Date: Tue, 13 Sep 2022 08:35:16 -0400
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <tfpte5$2j33b$1@dont-email.me>
References: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 13 Sep 2022 12:35:17 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="1c7cb9b871368ba456f72ae8f5ed303a";
logging-data="2722923"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QVKZpcsjMcOicSzHE9yz4CJZBJHWR534="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Cancel-Lock: sha1:va6xXnhyuaotsm+5rvGZBtlc8KM=
Content-Language: en-US
In-Reply-To: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
 by: Timothy Chow - Tue, 13 Sep 2022 12:35 UTC

On 9/13/2022 5:51 AM, peps...@gmail.com wrote:
> In another thread, Tim gave an example of an XG error that XG makes in
> a particular position (probably class of position) intermittently.
> However, the bug affects XG's evaluations only, not its play.

I don't actually know that the bug does not affect its play, although
it's true that I don't have any examples.

> What the code does (as part of a test) is to take the mean of several
> instances of 0.1. Sometimes, it correctly calculates the mean to be 0.1 but sometimes it calculates the mean to be (approx) 0.1 - 1e-17 (in other words
> 0.0999999999.....(I'm too lazy to count out all the 9s.))
>
> So, at least in python, we can get undefined behaviour very readily with
> very simple examples.
> I very much doubt that this would happen in C++ where arithmetic
> processes are much better documented and standardised.

Part of the problem lies not with Python or C++ but with the IEEE
floating point standard itself, which does not completely specify
everything.

---
Tim Chow

Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

<tfq2eq$2jinu$1@dont-email.me>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9842&group=rec.games.backgammon#9842

  copy link   Newsgroups: rec.games.backgammon
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ah_c...@ymail.com (ah....Clem)
Newsgroups: rec.games.backgammon
Subject: Re: Why I was unsurprised by Tim's surprising example of one of XG's
surprises
Date: Tue, 13 Sep 2022 10:00:57 -0400
Organization: The Future Fair
Lines: 31
Message-ID: <tfq2eq$2jinu$1@dont-email.me>
References: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
<tfpte5$2j33b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 13 Sep 2022 14:00:58 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="69c6af1c7a94fc2fb0feb136bc295756";
logging-data="2738942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18j3jmk2yQKjYtgA2GTI61o"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Cancel-Lock: sha1:YpM6ouzaTydhJDiaw9Rk73CcxPM=
Content-Language: en-US
In-Reply-To: <tfpte5$2j33b$1@dont-email.me>
 by: ah....Clem - Tue, 13 Sep 2022 14:00 UTC

On 9/13/2022 8:35 AM, Timothy Chow wrote:
> On 9/13/2022 5:51 AM, peps...@gmail.com wrote:

>> What the code does (as part of a test) is to take the mean of several
>> instances of 0.1.  Sometimes, it correctly calculates the mean to be
>> 0.1 but sometimes it calculates the mean to be (approx) 0.1 - 1e-17
>> (in other words
>> 0.0999999999.....(I'm too lazy to count out all the 9s.))
>>
>> So, at least in python, we can get undefined behaviour very readily with
>> very simple examples.
>> I very much doubt that this would happen in C++ where arithmetic
>> processes are much better documented and standardised.
>
> Part of the problem lies not with Python or C++ but with the IEEE
> floating point standard itself, which does not completely specify
> everything.

My understanding is that in C and C++, even if you've declared the
datatypes as floating point, if all the operands are integer values it
uses the algorithm for integer arithmetic instead of floating point
(with all the issues you have to deal with when using a finite model of
the real numbers).

Been a long time since I did anything in either language, and my memory
may be faulty. Not sure about Python since I never did anything serious
with it where I needed to worry about such things.

--
Ah....Clem
The future is fun, the future is fair.

Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

<b4ca7e2f-f2f7-4da9-be27-955ae36e7398n@googlegroups.com>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9845&group=rec.games.backgammon#9845

  copy link   Newsgroups: rec.games.backgammon
X-Received: by 2002:ac8:5fc7:0:b0:35b:ad1a:a091 with SMTP id k7-20020ac85fc7000000b0035bad1aa091mr13461069qta.616.1663086140992;
Tue, 13 Sep 2022 09:22:20 -0700 (PDT)
X-Received: by 2002:a05:6830:6214:b0:638:c7e4:b57c with SMTP id
cd20-20020a056830621400b00638c7e4b57cmr13254674otb.118.1663086140727; Tue, 13
Sep 2022 09:22:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: rec.games.backgammon
Date: Tue, 13 Sep 2022 09:22:20 -0700 (PDT)
In-Reply-To: <tfq2eq$2jinu$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=217.155.59.144; posting-account=X1j9wgoAAADLt4UnZrIneT3jwl9HvLMd
NNTP-Posting-Host: 217.155.59.144
References: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
<tfpte5$2j33b$1@dont-email.me> <tfq2eq$2jinu$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b4ca7e2f-f2f7-4da9-be27-955ae36e7398n@googlegroups.com>
Subject: Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises
From: pepste...@gmail.com (peps...@gmail.com)
Injection-Date: Tue, 13 Sep 2022 16:22:20 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2362
 by: peps...@gmail.com - Tue, 13 Sep 2022 16:22 UTC

On Tuesday, September 13, 2022 at 3:01:00 PM UTC+1, ah....Clem wrote:
....
> My understanding is that in C and C++, even if you've declared the
> datatypes as floating point, if all the operands are integer values it
> uses the algorithm for integer arithmetic instead of floating point
> (with all the issues you have to deal with when using a finite model of
> the real numbers).
.....
This seems unlikely. Because it means that if you write double x = 5.0000000;
double y = 6.000000000;

double z = x + y;

Then the underlying compiler code would need to say ["If x has an integer value then..."]
The compiler would then have to check that 5.000000000 == 5 and that doesn't sound at all C++-like,
as the philosophy of C++ is very much to avoid unnecessary checking.

However, it's entirely possible that the (fully legal C++ code) :
double x = 5;
double y = 6;
double z = x + y;

operates in the way you said. No reason that the compiler can't check that there is no dot in the expression for
the double and then treat it as an integer.
If you don't like this, write double x = 5.0 instead.

Paul

Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

<0601c769-cc83-4bc0-8729-53d081e3dcf6n@googlegroups.com>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9847&group=rec.games.backgammon#9847

  copy link   Newsgroups: rec.games.backgammon
X-Received: by 2002:ac8:5c91:0:b0:35b:bc2d:527 with SMTP id r17-20020ac85c91000000b0035bbc2d0527mr5177994qta.674.1663097625180;
Tue, 13 Sep 2022 12:33:45 -0700 (PDT)
X-Received: by 2002:a05:6870:819a:b0:127:4360:101e with SMTP id
k26-20020a056870819a00b001274360101emr472745oae.49.1663097624942; Tue, 13 Sep
2022 12:33:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: rec.games.backgammon
Date: Tue, 13 Sep 2022 12:33:44 -0700 (PDT)
In-Reply-To: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fb90:b780:bef:4c47:8574:fce7:266c;
posting-account=ZoOzZggAAADKiZinXeenHF1SgY613agP
NNTP-Posting-Host: 2607:fb90:b780:bef:4c47:8574:fce7:266c
References: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0601c769-cc83-4bc0-8729-53d081e3dcf6n@googlegroups.com>
Subject: Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises
From: mur...@compuplus.net (MK)
Injection-Date: Tue, 13 Sep 2022 19:33:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1633
 by: MK - Tue, 13 Sep 2022 19:33 UTC

On September 13, 2022 at 3:51:47 AM UTC-6, peps...@gmail.com wrote:

> As a python coder (among other things), I found .....
> What the code does (as part of a test) is to take the
> mean of several instances of 0.1. Sometimes, it
> correctly calculates the mean to be 0.1 but sometimes
> it calculates the mean to be (approx) 0.1 - 1e-17

I would like to watch you discuss this in a Python forum... ;)

MK

Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

<46dc3947-c93f-4963-8648-f55d7e196b00n@googlegroups.com>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9848&group=rec.games.backgammon#9848

  copy link   Newsgroups: rec.games.backgammon
X-Received: by 2002:a05:622a:13d3:b0:35a:6c40:da6d with SMTP id p19-20020a05622a13d300b0035a6c40da6dmr23435906qtk.253.1663099056331;
Tue, 13 Sep 2022 12:57:36 -0700 (PDT)
X-Received: by 2002:a4a:654c:0:b0:475:7b3b:6081 with SMTP id
z12-20020a4a654c000000b004757b3b6081mr3413718oog.70.1663099056065; Tue, 13
Sep 2022 12:57:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: rec.games.backgammon
Date: Tue, 13 Sep 2022 12:57:35 -0700 (PDT)
In-Reply-To: <tfpte5$2j33b$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fb90:b780:bef:4c47:8574:fce7:266c;
posting-account=ZoOzZggAAADKiZinXeenHF1SgY613agP
NNTP-Posting-Host: 2607:fb90:b780:bef:4c47:8574:fce7:266c
References: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com> <tfpte5$2j33b$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46dc3947-c93f-4963-8648-f55d7e196b00n@googlegroups.com>
Subject: Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises
From: mur...@compuplus.net (MK)
Injection-Date: Tue, 13 Sep 2022 19:57:36 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2717
 by: MK - Tue, 13 Sep 2022 19:57 UTC

On September 13, 2022 at 6:35:19 AM UTC-6, Tim Chow wrote:

> On 9/13/2022 5:51 AM, peps...@gmail.com wrote:

>> In another thread, Tim gave an example of an XG error
>> that XG makes in a particular position (probably class
>> of position) intermittently. However, the bug affects
>> XG's evaluations only, not its play.

> I don't actually know that the bug does not affect its play,
> although it's true that I don't have any examples.

Have you found enough similar examples to justify his
saying a "class" (possibly many "classes") of positions?

And what about "intermittently"? Have you checked to
see if it's "consistent" rather than "intermittent"? (which
wouldn't take only a minimal effort)

>> I very much doubt that this would happen in C++ where
>> arithmetic processes are much better documented and
>> standardised.

> Part of the problem lies not with Python or C++ but with
> the IEEE floating point standard itself, which does not
> completely specify everything.

XG was developed (or rather "translated into"??) Delphi. So,
definitely not related to languages nor even IEEE standards.

Some decimal numbers can't be represented in any finite
amount of bits. Thus, some precision loss is inevitable in
any hardware/software platform. But I thought you would
all know that already. Besides, calculating equities to only
4 or 6 decimal digits shouldn't suffer from this problem. I
wonder what I may be missing in this conversation..?

MK

Re: Why I was unsurprised by Tim's surprising example of one of XG's surprises

<tfrbfg$2q5cl$1@dont-email.me>

  copy mid

https://www.novabbs.com/interests/article-flat.php?id=9851&group=rec.games.backgammon#9851

  copy link   Newsgroups: rec.games.backgammon
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: tchow12...@yahoo.com (Timothy Chow)
Newsgroups: rec.games.backgammon
Subject: Re: Why I was unsurprised by Tim's surprising example of one of XG's
surprises
Date: Tue, 13 Sep 2022 21:41:02 -0400
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <tfrbfg$2q5cl$1@dont-email.me>
References: <82641b7b-037b-4dd4-b41e-a5f10ed5f413n@googlegroups.com>
<tfpte5$2j33b$1@dont-email.me>
<46dc3947-c93f-4963-8648-f55d7e196b00n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 14 Sep 2022 01:41:04 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="2a3b686a8bdf0c4a539d87d500878769";
logging-data="2954645"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4GI1bDYgql4HuTMsBGXTPAykDj2vmpAw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Cancel-Lock: sha1:RRkeaOnGWOl9gLXjATzRVDEgq7U=
Content-Language: en-US
In-Reply-To: <46dc3947-c93f-4963-8648-f55d7e196b00n@googlegroups.com>
 by: Timothy Chow - Wed, 14 Sep 2022 01:41 UTC

On 9/13/2022 3:57 PM, MK wrote:
> On September 13, 2022 at 6:35:19 AM UTC-6, Tim Chow wrote:
>
>> On 9/13/2022 5:51 AM, peps...@gmail.com wrote:
>
>>> In another thread, Tim gave an example of an XG error
>>> that XG makes in a particular position (probably class
>>> of position) intermittently. However, the bug affects
>>> XG's evaluations only, not its play.
>
>> I don't actually know that the bug does not affect its play,
>> although it's true that I don't have any examples.
>
> Have you found enough similar examples to justify his
> saying a "class" (possibly many "classes") of positions?

What I can say is that this sort of thing has happened to me
a number of times when I have clicked "Analyze Session" after
just concluding a 7-point match against XG. That is, some
move will be evaluated in some bizarre manner. I haven't
kept track, but I'd guess that I've noticed it happening maybe
1 out of every 500 matches or so.

I haven't noticed any particular pattern to the specific
positions or decisions that get bizarrely evaluated, though.

> And what about "intermittently"? Have you checked to
> see if it's "consistent" rather than "intermittent"? (which
> wouldn't take only a minimal effort)

Yes, when I try re-evaluating, the anomaly goes away. At least,
every time that I've tried.

---
Tim Chow

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor