Tech Notes Logo


I first encountered Pancet back in 1972 on an old Interdata machine. The idea of a game that learned as you played it intriged me, but I had but a few opportunities to pursue that line of thought. Ventures like these must wait for other excuses to appear before they can be pursued. In the early 80's I wrote an Othello game to learn the computer language Pascal. Pancet is much the same, first written with an early version of the Sun Java Development Kit in order to learn Java. I've been using it since to keep up my Java skills. I have progressed from working in Notepad and an early flirtation with Visual J++, to Borland's excellent JBuilder. A lovely tool that is comfortable working both in Unix and Windows. I hope you enjoy the game. Watch the stored move counter as it builds and trims the move tree.

The Path to Victory

Pancet uses a self trimming move tree to store move strategy. The tree adds moves randomly until the conclusion of the a game and prunes itself back to the last guess made. The next time that situation is encountered, the tree picks the other direction. If that direction proves to be unfruitful, then it prunes itself back further, until it reaches a pathway that leads to victory. I think this best shown as an example. The following is a map of several games. Pancet has lost the previous game so it is moving first.

 Game1  Game2  Game3  Game4

  2 2    2 2    2 2    2 2
  2 2    2 2    2 2    2 2

B 2 0  B 2 0  B 2 0  B 2 0
  3 3    3 3    3 3    3 3
  
D 3 0  D 3 0  D 3 0  D 3 0
  4 0    4 0    4 0    4 0
  
A 0 1  A 0 1  A 0 1  A 0 1
  5 1    5 1    5 1    5 1
  
D 0 1  D 0 1  D 0 1  D 0 1
  6 0    6 0    6 0    6 0
  
B 0 0  B 0 0  B 0 0  B 0 0
  6 0    6 0    6 0    6 0

C 2 2  C 2 2  C 2 2  C 2 2
  1 1    1 1    1 1    1 1
  
A 0 3  B 2 0  B 2 0  B 2 0
  1 2    2 2    2 2    2 2
  
D 0 3  D 3 0  D 3 0  D 3 0
  2 0    3 0    3 0    3 0
  
B 0 0  A 0 1  A 0 1  A 0 1
  3 1    4 1    4 1    4 1
  
D 0 0  D 0 1  D 0 1  D 0 1
  4 0    5 0    5 0    5 0
  
 LOSS  B 0 0  B 0 0  B 0 0
         5 0    5 0    5 0
		 
       C 2 1  C 2 1  C 2 1
         1 1    1 1    1 1
		
       A 0 2  B 2 0  B 2 0
         1 2    1 2    1 2
		 
       D 0 2  D 3 0  D 3 0
         2 0    2 0    2 0
		 
       B 0 0  A 0 1  A 0 1
         3 1    3 1    3 1
		 
       D 0 0  D 0 1  D 0 1
         4 0    4 0    4 0
		 
        LOSS  B 0 0  B 0 0
                4 0    4 0
				
              C 1 1  C 1 1
                0 1    0 1
				
              A 0 2  B 1 0
                0 1    0 2
				
              D 0 2  D 2 0
                0 0    1 0
				
              B 0 0  A 0 1
                0 1    1 0
				
              D 0 0  C 0 1
                0 0    0 0
				
               LOSS  B 0 0 
                       0 0
					   
                      WIN!

Efficiency

Pancet stores it's moves by the board pattern, with no duplicates allowed. This means that when it encounters a board pattern that is has tried before, but arrives at it from a different direction, it can pick up the winning strategy that it developed before. An example:

                1 1    1 2
                0 3    0 2
				
              D 2 2    2 2
                1 0    1 0
The board pattern 2210 has been arrived at from two different directions, but if Pancet has a winning strategy, it will proceed with it. Sadly, it doesn't keep losing patterns as yet. If there are no untried branches from this point, it would be nice if the game resigned rather than continuing with previously tried moves that lead to a loss. This will probably be next enhancement.

Mark Bondurant
mbondr@bongo.net