Forum Archive :
Programming
Methods of encoding positions
|
> In these days of human-mediated machine-to-machine communication,
> would it not be possible for your programmes to export and read a
> compact board notation? Something a bit like the Forsythe notation
> for a chess position. A simple example of what might be possible:
> <m/x4/o2222//o4/o4/o4/19/x/x5>
> Meaning:
> Money game.
> X owns a 4 cube.
> O has all of a double two to move.
> No men on the bar.
> O has four men each on his 1, 2 and 3 points.
> X has one man on his 2 point and five on his 1 point.
There are a few schemes for recording positions that (I think) come close
to what you want. Jellyfish ".pos" files are perhaps the most widely
used; programs that handle it include Jellyfish (surprise!), the BBGT
FIBS client, BGBlitz, and GNU Backgammon. The format is documented at:
http://jelly.effect.no/fspec.htm
FIBS "boardstyle 3" output is nice and compact, and implicitly understood
by pretty much every FIBS client out there, although it's not currently
used as an external representation. The description is:
http://www.fibs.com/fibscmds.html#rawboard
GNU Backgammon uses a very short text string to describe a board position;
for instance, when running on a text terminal, it shows the position you
describe as:
GNU Backgammon Position ID: XwAAgPceAAAAAA
+12-11-10--9--8--7-------6--5--4--3--2--1-+ O: gnubg
| | | O O O | O Rolled 22
| | | O O O | O
| | | O O O | O
| | | O O O |
| | | |
^| |BAR| |
| | | X | X
| | | X | XX
| | | X | XX
| | | X | XX
| | | X X | XX
+13-14-15-16-17-18------19-20-21-22-23-24-+ X: gary (Cube: 4)
The "XwAAgPceAAAAAA" describes the chequer positions; the gnubg command
"set board XwAAgPceAAAAAA" will restore the above position. The position
ID format is documented at:
http://www.cs.arizona.edu/~gary/backgammon/positionid.html
Position IDs do not include the cube value, match score, player names,
etc., however; an extensible format for recording auxiliary information
like that is SGF (Smart Game Format):
http://www.red-bean.com/sgf/
and SGF for backgammon in particular:
http://www.red-bean.com/sgf/backgammon.html
Cheers,
Gary.
|
|
|
|
Programming
- Adjusting to a weaker opponent (Brian Sheppard, July 1997)
- Anticomputer positions (Bill Taylor+, June 1998)
- BKG 9.8 vs. Villa (Raccoon+, Aug 2006)
- BKG 9.8 vs. Villa (Andreas Schneider, June 1992)
- BKG beats world champion (Marty Storer, Sept 1991)
- Backgames (David Montgomery+, June 1998)
- Blockading feature (Sam Pottle+, Feb 1999)
- Board encoding for neural network (Brian Sheppard, Feb 1997)
- Bot weaknesses (Douglas Zare, Mar 2003)
- Building and training a neural-net player (Brian Sheppard, Aug 1998)
- How to count plies? (Chuck Bower+, Jan 2004)
- How to count plies? (tanglebear+, Mar 2003)
- Ideas for improving computer play (David Montgomery, Feb 1994)
- Ideas on computer players (Brian Sheppard, Feb 1997)
- Introduction (Gareth McCaughan, Oct 1994)
- Measuring Difficulty (John Robson+, Feb 2005)
- Methods of encoding positions (Gary Wong, Jan 2001)
- N-ply algorithm (eXtreme Gammon, Jan 2011)
- Neural net questions (Brian Sheppard, Mar 1999)
- Pruning the list of moves (David Montgomery+, Feb 1994)
- Search in Trees with Chance Nodes (Thomas Hauk, Feb 2004)
- Source code (Gary Wong, Dec 1999)
- TD-Gammon vs. Robertie (David Escoffery, June 1992)
- Training for different gammon values (Gerry Tesauro, Feb 1996)
- Training neural nets (Walter Trice, Nov 2000)
- Variance reduction in races (David Montgomery+, Dec 1998)
- Variance reduction of rollouts (Michael J. Zehr+, Aug 1998)
- Variance reduction of rollouts (Jim Williams, June 1997)
- What is a "neural net"? (Gary Wong, Oct 1998)
- Writing a backgammon program (Gary Wong, Jan 1999)
From GammOnLine
Long message
Recommended reading
Recent addition
|
| |
|