[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] GNU Go 3.1.32 - VC inconsistencies
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] GNU Go 3.1.32 - VC inconsistencies |
Date: |
Thu, 18 Apr 2002 22:16:10 +0200 (CEST) |
On Thu, 18 Apr 2002, Gunnar Farneback wrote:
> In mkpat.c we have some code to optimize the anchor point:
>
> mi = ((float)maxi - 1.0) / 2.0;
> mj = ((float)maxj - 1.0) / 2.0 - 0.01;
> for (k = 0; k != el; k++)
> if (elements[k].att < 3 && (elements[k].att & anchor) != 0) {
> d = gg_abs((float)elements[k].x - mi)
> + gg_abs((float)elements[k].y - mj);
> if (d < min_d) {
> min_k = k;
> min_d = d;
> }
> }
>
> Due to the 0.01 offset the numbers become inexactly represented and we
> get the platform dependency potential. The patch below fixes this with
> a gg_normalize_float() call, but the real question is why we have this
> offset at all.
I assume this is because the DFA spiral is not symmetric (it starts by
going SOUTH then going EAST), and so the optimal anchor point may e.g.
be preferred to be one element to the left than on element to the right
of the center (both to reduce the size of the DFA and the pattern matching
runtime). The databases contribute a non-negligeable asymmetry as well, e.g.
most patterns in owl_*.db that have a border have it on the SOUTH edge.
(Note that only one of the eight orientations of the spiral is used when
the DFA is built.)
Arend
- Re: [gnugo-devel] arend_1_33.5: Try to address VC inconsistencies, (continued)
- Re: [gnugo-devel] arend_1_33.5: Try to address VC inconsistencies, Trevor Morris, 2002/04/16
- Re: [gnugo-devel] arend_1_33.5: Try to address VC inconsistencies, Gunnar Farneback, 2002/04/16
- Re: [gnugo-devel] arend_1_33.5: Try to address VC inconsistencies, Arend Bayer, 2002/04/16
- [gnugo-devel] Handtalk series update, Jessie Annala, 2002/04/17
- Re: [gnugo-devel] Handtalk series update, Daniel Bump, 2002/04/17
- Re: [gnugo-devel] Handtalk series update, David Fotland, 2002/04/17
- Re: [gnugo-devel] Handtalk series update, bump, 2002/04/17
- Re: [gnugo-devel] arend_1_33.5: Try to address VC inconsistencies, Trevor Morris, 2002/04/17
- Re: [gnugo-devel] arend_1_33.5: Try to address VC inconsistencies, Arend Bayer, 2002/04/22
- Re: [gnugo-devel] GNU Go 3.1.32 - VC inconsistencies, Gunnar Farneback, 2002/04/18
- Re: [gnugo-devel] GNU Go 3.1.32 - VC inconsistencies,
Arend Bayer <=
Re: [gnugo-devel] GNU Go 3.1.32, Marco Scheurer, 2002/04/15
Re: [gnugo-devel] GNU Go 3.1.32, Gunnar Farneback, 2002/04/19