Palamedes User Manual



Palamedes is a project dedicated to offering expert playing computer opponents at backgammon and several other variants. Currently users of Palamedes can play the variants Portes, Plakoto, Fevga collectively called Tavli (Greek backgammon) and the variants Nackgammon, Hypergammon, Narde, Takhteh. For position evaluation, Palamedes uses neural networks trained by a form of temporal difference learning and millions of self-play games. Palamedes also offers simple ways of storing and loading games, as well as simple analyzing tools.


Palamedes is free software. This means that the user can use all of the features of the software at no cost. If you have paid to obtain this software, get your money back. Selling this software is absolutely prohibited. Distributing this software in any form is permitted only if it is approved by the author.


System Requirements

Palamedes should be able to run under all Windows versions. However, versions before Windows XP have not been tested. As of version 0.46a, Palamedes requires a x86 processor that supports SSE2. Processors bought after 2006 should be fine.

Latest version (after 0.43a):

Download and run the Palamedes_install.exe from the program website. Follow the installation instructions. Run the Palamedes shortcut on the desktop for the program to start.

Previous versions (before 0.43a):

Download the respective version's .zip file from the program website. Decompress on a directory of your choice. Run the .exe from the directory for the program to start.

Game Rules

Palamedes supports the greek backgammon games Portes, Plakoto, Fevga (also known collectivly as Tavli) as well as other variants such as HyperGammon, Narde, and Takhteh. All the games are two player games that can be played at a 24-point board, comprised of 4 6-point quadrants. The last quadrant of each player is called home board for that player. The players have 15 men or checkers at their disposal that can be moved according to the rolls of two dice and the rules.

General rules for all games

Object of the game: The object of the game is to bring all your checkers around to your own home board and then bear them off. The first player to bear off all of his checkers wins the game.
To start: Each player rolls one die and the higher number goes first. That player then rolls the dice again to begin his first turn.
Movement: The roll of the dice indicates how many points or pips the player is to move his checkers. The following rules apply:

  • A checker may be moved only to an open point, one that is not occupied by two or more opposing checkers.
  • The numbers on the two dice constitute separate moves. For example, if a player rolls 5 and 3, he may move one checker five spaces to an open point and another checker three spaces to an open point, or he may move the one checker a total of eight spaces to an open point, but only if the intermediate point (either three or five spaces from the starting point) is also open.
  • Doubles are played twice. For example, a roll of 6-6 means the player has four sixes to use.
  • You must use both numbers of a roll if possible, or all four numbers in the case of doubles. When only one number can be played, the player must play that number. Or if either number can be played but not both, the player must play the larger one. When neither number can be used, the player loses his turn. In the case of doubles, when all four numbers cannot be played, the player must play as many numbers as he can.
Bearing Off: Once you have moved all fifteen of your checkers into your home board, you may begin bearing off. You bear off rolling a number that corresponds to the point on which the checker resides, and then removing that checker from the board. If there is no checker on the point indicated by the roll, then you must make a legal move using a checker on a higher-numbered point. If there are no checkers on higher-numbered points, you must remove a checker from the highest point that has a checker.
Scoring: The first player to bear off all fifteen checkers wins the game. If the losing player has borne off at least one checker, he loses only one point; otherwise he loses two points.

Specific rules for each variant:
Card image cap

Starting position: Each player starts in a specific checker configuration shown in the above diagram. The checkers move around the board in opposite directions.

Hitting: A checker sitting alone on a point is called a blot. If an opposing checker lands on a blot, the blot is hit and placed on the bar.

Entering from the bar: Any time you have one or more checkers on the bar, your first obligation is to enter those checker(s) into the opposing home board. You enter a checker by moving it to an open point corresponding to one of the numbers on the rolled dice. If you are able to enter some but not all of your checkers, you must enter as many as you can then give up the remainder of your turn.

Card image cap

Starting position: Each player starts with fifteen checkers on the opponent's one-point. The checkers move around the board in opposite directions as shown in the above diagram.

Pinning the opponent: There is no hitting in this game. Instead, if you land on a point occupied by a single opposing checker, the opponent's checker is trapped until you remove your checker. Two of your checkers on a point or one of your checkers pinning the opponent's checker creates a block which the opponent cannot land or touch down on.

Pinning the mother checker: The last checker on your starting point is called the mother. If this checker gets pinned by the opponent before it has left the start, the game is over and you lose two points. The only exception is if the opponent still has checkers on his starting point, since in this case his own mother is still threatened. A game in which both mothers are pinned is a tie.

Bearing Off: Normal bearoff rules apply with the following addition: You cannot bear off when you have one or more checkers pinned inside your home board.

Card image cap

Starting position: Each player starts with fifteen checkers on the rightmost point of the far side of the board, at diagonally opposite corners from each other. They both move in the same direction, counterclockwise, around the board.

First checker away: Your first checker must pass the opponent's starting point, before you may move any of your other checkers. For example, after White's initial roll of 6-6, he moves his first checker forward six spaces, but then he is stuck. He cannot move the same checker any further because it is blocked, and he cannot move any other checker, until the first checker is past the opponent's starting point.

No hitting: A major difference between Fevga and other forms of backgammon is that there is no hitting in this game. One checker by itself controls a point, and an opposing checker may not occupy the controlled point.

Limitation on primes: You are not allowed to block all six points in your starting table and in the starting table of the opponent.

No blocking rule: You may not select a move that results to a complete block of your opponent. Exception: when all your available moves completely block the opponent then you may select any move you want like always.


Narde is a Russian game with similar rules to Fevga.

Starting position: Identical as Fevga.

No hitting: Same as Fevga: One checker by itself controls a point, and an opposing checker cannot occupy this point.

Moving off the "head": The starting point for either player is called that player's "head." You may move only one checker off of your head each turn. The one exception is the first roll of the game in which you may move two checkers off your head. Two off the head is forced when a player rolls 3-3, 4-4, or 6-6 for his first roll.

Limitation on primes: You may not build a prime (six consecutive blocks) in front of all of the opponent's checkers; at least one opposing checker must be in front of your prime.


Starting position: Each side starts with just three checkers: one on each of the opponent's one-point, two-point, and three-point. Palamedes also offers more complex variations up to 6 checkers per player. In Palamedes, standard Hypergammon is called Hypergammon-3. When 4 checkers are used per player then the game is named Hypergammon-4, for 5 checkers we have Hypergammon-5 etc.

Play: The rules are the same as for standard backgammon/Portes. You make points, hit opposing blots, and bear your checkers off just as in the regular game.


Takhteh (also spelled "Takhte") is the Persian name for backgammon. The rules are similar to Portes but not exactly the same. The differences are:

No "hit and run": You may not run for cover after hitting an opposing blot in your own home board. If you choose to hit within your home board, you must cover the hitting checker with another of your own or leave it exposed.

No pip wastage: You may not unnecessarily "waste pips" during bearoff. This means you should always bear off a checker where possible rather than use a smaller number to move that checker forward.

Card image cap
Game Screen

Program Menu:

  • File: Open and save game files, start new game, etc
  • Game: Items related to gameplay: undo move, resign game. Also other game-related items: Statistics, Analysis, Options
  • Help: Show this help page and the about dialog.

ToolBar Icons: Here the most common user actions are grouped as icons.

  • New: Starts a new game
  • Open: Opens an existing game file
  • Save: Saves the current game to file
  • Demo: Starts a demo session where Palamedes plays against itself using the best strategy available. The Demo can be stopped by pressing Esc.
  • Undo: Undos the current move of the player. This means that when the player is on the move, it places the checkers in the position after the player rolled the dice.
  • Resign: Press this button when you want to resign the current game.
  • Options: Opens the program options.
  • Stats: Opens the statistics page.
  • Exit: Close the program and exit.

Pipcount Display: This area, on the right of the toolbar icons, displays the Pipcount for each player in the current game. Pipcount is total number of points (pips) that a player must move his checkers to the home board and bear them off.

Board: The backgammon board where the games can be played. It consists of:

  • 4 quadrants of 6 points, each labeled from 1 to 24.
  • the bar point which is in the middle of the board.
  • the bearoff points of both players in the right side.
  • Palamedes dice area: this area displays the dice rolled by Palamedes.
  • Player dice are: this area displays the dice rolled by the user.

Scoresheet: This is a non-editable grid where the dice rolls and the moves of both players are displayed automatically after the completion of a move. There is a header column that displays the move number of each player. Next to this header, the grid has 4 columns:

  • Column 1: Dice rolled by Palamedes
  • Column 2: Move played by Palamedes
  • Column 3: Dice rolled by the user
  • Column 4: Move played by the user
When the game is over (or when not playing in auto_checker mode), the user can click on any cell of the grid and the board will instantly show the respective position. Navigation through the grid cells can be made using the standard keyboard buttons:
  • Tab: Go to the next cell to the right. If it the last column, go to the cell at the next row-first column.
  • Shift+Tab: Go to the previous cell to the left. If it is the first column, go to the cell at the previous row-last column.
  • Arrow keys: Go to the respective direction within the confines of the grid.
  • Page Up: Go to the first row visible in the grid.
  • Page Down: Go to the last row visible in the grid.
  • Home: Go to the first column of the current row.
  • End: Go to the last column of the current row.

StatusBar: This area displays program messages.

How to play a game

The user can start a game by pressing the toolbar button "New" or by selecting File->New from the menu. The following options will appear:

Select game type: Here the user selects the type of game he wants to play (Portes, Plakoto, Fevga, Narde, HyperGammon, Takhteh)

Select AI opponent: Here the users selects the strategy (neural network) that will be used by the Artificial Intelligence (AI) computer opponent. The strategies are sorted in ascending performance. For example Portes (pubeval) is weaker than Portes 160, which in turn is weaker than Portes ACG-13. Portes (pubeval) is a benchmark neural network created by Gerald Tesuaro. Portes ACG-13 is the neural network that Palamedes used at the 2011 Backgammon Computer Olympiad where it took the gold medal.

Select lookahead: Here the user selects how far the computer should search the game tree. 1-move means that the computer will search only the available moves in the current position/roll. 2-move means that the computer will search all 1-move positions of the current position/roll and then analyze all the available moves for the opponent for every dice roll possible. 2-move is almost always better than 1-move but is slower. If the Threshold option is different than zero, then the 2-move look-ahead only considers the best k 1-move positions before going to the next level (where k= the threshold value).

Enter your name: The user can put his name here. This will be displayed in the scoresheet. The program automatically displays the name used in the last game played.

The game starts with each side rolling a die to determine which plays first. If it is the computer's side to move, the dice are rolled and displayed at the computer dice area and the move is played automatically. If it is the player's side to move, the dice are rolled at the player's dice area and the user must move the checker according to the rules. In order to move a checker, the user must first click the point where the checker resides and then click the point where he wants to move it. If the user wants to take back his current move, he can press the Undo button and the board will go back to the position after the dice roll was made. The program checks if the move played was valid according to the game rules. If the move was illegal, the board returns to the position before the move was made (undo) and the user must renter the move.

The user can resign the game at any moment by pressing the "Resign" toolbar button. If the user has borne off at least one checker, then the game is declared a single loss otherwise the game is declared a double loss.

Card image cap
Game analysis

Palamedes offers a move by move analysis feature. This feature is enabled by clicking the ''Analyze'' button, when the user selects a dice roll (1st and 3rd columns on the scoresheet). Note that in order for analysis to work, the game must be ended. The following dialog appears:

The selected position to be analyzed is shown at the upper left corner. The user enters the depth of the search (search plies), the threshold number k (for 2-move look-ahead) and the neural network engine that will perform the analysis. After the analysis button is pressed, the grid on the right side is filled with all the available moves scored by the neural network selected. The available moves are sorted in descending order, the best move goes first.

  • Move: a move to be analyzed (eg. 24/18 18/15)
  • Val(1ply): The score of the neural network. This value is computed from the W(1-ply), WD(1-ply), LD(1-ply).
  • W(1ply): The estimated probability if winning the game at 1-move search, regardless if it is single or double game
  • WD(1ply): The estimated probability if winning a double game at 1-move search.
  • LD(1ply): The estimated probability if losing a double game at 1-move search.
  • Val(2ply): The score of the neural network. This value is computed from the W(2-ply), WD(2-ply), LD(2-ply).
  • W(2ply): The estimated probability if winning the game at 2-move search, regardless if it is single or double game
  • WD(2ply): The estimated probability if winning a double game at 2-move search.
  • LD(2ply): The estimated probability if losing a double game at 2-move search.

Val(2ply), W(2-ply), WD(2ply) and LD(2ply) are filled only when Search Plies = 2 is selected in the left side options.

Program Options

Program options are divided into four parts: general, board, rules, and dice.

Card image cap

Check for updates at startup: Automatically check whether a new version is available every time the program starts. The same check can be run any time by pressing the "Check now" button. (Default: checked)

Auto save games: If this option is checked, the game will be automatically saved in the program directory when the game ends. The format of the game filename is YYYYMMDD_hhmmss.tavli. (Default: checked)

Player moves must always be legal: This option is currently disabled.

AI can resign: When checked the AI will offer its resignation when the odds of losing a game are very high. (Default: checked)

AI pruning

LookAhead Pruning: How many moves the program should keep before expanding to the second ply. If 0, then all moves are considered. This option is only relevant when 2-move look-ahead is selected. (Default: 0)

Prune when value difference greater than: If the difference of the value of a move in 1-ply and the value of the best move is greater than the number in this box then this move will not be expanded in 2-ply. For example, if this value is set at 0.5 and a move has a value at 1-ply at 0.1 while the best move has value 0.7, this move will not be expanded at 2-ply. If this value is set at 0 then no pruning of this type is taking place. This option is only relevant when 2-move look-ahead is selected. (Default: 0)

Language: Select the language of the program. Currently only English, Greek and German are supported. Language change needs a program restart to be applied (Default: English).

Card image cap


Automatically roll player dice: When checked, the dice of the player will be rolled automatically shortly after the computer completes a move. When unchecked, the player will need to press inside the dice area for the player dice to roll. (Default: checked)

Automatically roll computer dice: When checked, the dice of the computer will be rolled immediately after the player completes his move. When unchecked, the player will need to press inside the dice area for the computer dice to roll. (Default: checked)

Automatically play forced moves: When checked and the player has only one legal move, this move will be played automatically.
(Default: checked)

Player can move only highlighted points: When checked each time the player moves the points that can be legally moved will be highlighted with lime coloring and the player can only move from/to these points (Default: checked)

Animation speed: The time it takes (in milliseconds) for a single checker to move from its starting point to the resulting point. (Default: 1000 ms)

Board Appearenece

Player's checker color: Select the color of your checkers. (Default: red)

Opponent's checker color: Select the color of the computer's checkers. (Default: lightgreen)

Odd points color: Select the color of the odd board points. (Default: saddlebrown)

Even points color: Select the color of the even board point. (Default: palegoldenrod)

Board background color: Select the color of the boards' background. (Default: ivory)

Card image cap

Palamedes offers some variations to the central game rules of Tavli variants Changing these options in the middle of the game has no effect on the current game.

Portes Rules

Egyptian Rule: When checked the player cannot stack more than five checkers on a single point. (Default: unchecked)

Nackgammon start position: Starting position is that of nackgammon (Default: unchecked)

No hit and run in home board: as described in Takhteh rules.(Default: unchecked)

No pip wastage in bearoff: as described in Takhteh rules.(Default: unchecked)

Fevga Rules

Enforce Fevga starting checker rule: as described in Fevga rules (Default: checked)

Do not allow prime in front of our starting point: When checked the player on the move cannot make a prime in his first 6 points. (Default: checked)

Do not allow prime in front of opponent starting point: When checked the player on the move cannot make a prime in front of the opponent's starting point. (Default: checked)

Enable Fevga's blocking rule: as described in Fevga rules. (Default: checked)

Plakoto Rules

Continue game if mana point is pinned: When unchecked the game will terminate immidietaly after a mana point is pinned. When checked the game will continue until the first pinning player releases his mana point. If both players pin the mana points, then the result is a draw. (Default: unchecked)

Tapa start position: When selected, Plakoto games will start with each player having 5 checkers in their first 3 points, instead of 15 checkers in the first point.(Default: unchecked)

Card image cap

Manual Dice:
If this is option is checked, each dice roll must be entered by the user. Unselected, the dice are rolled by the computer. (Default: unchecked)

Dice Generation Method:
This option selects the pseudo-random dice generator algorithm. Four algorithms are supported:

  • Linear Congruential
  • Mersenne Twister (Default)
  • Lagged Fibonacci
  • Ranlux

This a number used to initialize the dice generation algorithm. At program startup the seed is updated from the system clock. Whenever the seed is changed by the user, the selected dice generation method will always generate the same dice sequence according to the new seed number.

First roll not double:
When this option is checked, the first roll of the the player starting the game cannot be a doubles roll. (Default: unchecked)

Advanced Features

Open/saving .tavli files

The current game played at the board can be saved by pressing the "Save" toolbar button or from File->Save menu item. The game is stored in a text file with a .tavli extension. This file can be read by any text editor like notepad. Stored games can be loaded using the "Open" toolbar button or the File->Open menu item.

File->Load NN

Loads a new Neural Network from a file. This function is used by the developers to test new neural networks.

Game->Delete remaining moves

The current game played at the board can be saved by pressing the "Save" After a computer move the user can click any position at the scoresheet and then select this item to delete all the moves that follow from there on. Since the rest of the game is deleted, play continues from the current position.

Plakoto Pin Databases

The current game played at the board can be saved by pressing the "Save" Starting from version 0.44a, Palamedes includes 6-point, 1-sided databases for Plakoto's pinned positions inside the home board. There are 5 files named Plakoto_xb.pinDB, where x=1 to 5 stored in the program directory that are loaded at program startup. The databases are used when in a Plakoto game the AI has pinned one checker in his home board and the player has also pinned one computer checker. The values stored in the databases are the weighted-average number of plies to unpin, which is the expected number of plies the moving player will unpin the pinning point with perfect play. When these databases are used, the program selects the move that results in the position with the largest value.

The databases can also be used in the analysis window. If the position analyzed has the above characteristics, there will be another option available named "Plakoto_DB". This will show the value stored in the databases sorted in descenting order.


Comments and suggestions can be mailed to

© Nikolaos Papahristou, All rights reserved

Version: 0.06 2013/08/08