[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] New union type in moverecord?

From: Øystein O Johansen
Subject: [Bug-gnubg] New union type in moverecord?
Date: Wed, 23 Apr 2003 12:09:10 +0200


As I went to my hotel room monday night, Achim showed me yet another bug
while saving and opening positions. I really think there's a dead dog
burried here which gives us problems, bugs and limitations. Half asleep I
suggest for Achim that this may be solved with a new union type in the
moverecord. Do you think this is  a good idea? I think it may solve some of
the problems we have right now.

Here's my suggestion for structure:

typedef struct _movesetposition {
    movetype mt;
    char *sz;

    /* The board _before_ any move is done, the move is not even stored */
    unsigned char auchKey[ 10 ]; /* always stored as if player 0 was on
roll */
    /* or maybe it should be int anBoard[2][25]; */

    int fPlayer;
    int anDice[ 2 ];
    int nCube;
    int fCubeOwner;
    /* evaluation of cube action */
    float aarOutput[ 2 ][ NUM_ROLLOUT_OUTPUTS ];
    float aarStdDev[ 2 ][ NUM_ROLLOUT_OUTPUTS ];
    float arDouble[ 4 ];
    evalsetup esDouble;
    /* evaluation of the moves */
    movelist ml;
    int iMove; /* index into the movelist of the move that was made */
    lucktype lt;
    float rLuck; /* ERR_VAL means unknown */
    skilltype stMove;
    skilltype stCube;
} movesetposition;

I have not done any testing or even thought about how to implement this
structure into function like saving positions and AddMoveRecord and
analysing positions. Analyse position will probably be a new menu option
with this structure. I guess it will solve some of the problems we have
today (and create some other problems ;-) )

Just think about it. Smart or not? Is the structure complete?


The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]