Undocumented feg feature

Endgame analysis using tablebases, EGTB generation, exchange, sharing, discussions, etc..
Post Reply
Tuhma
Posts: 15
Joined: Sat Sep 29, 2007 10:48 am

Undocumented feg feature

Post by Tuhma »

I have been using feg.exe a lot lately. And quite suprisingly, I found very nice undocumeted feature from it.
feg has two undocumeted commandline options :

feg -p and feg -pe

where p means position, I guess, and pe means epd position.

I don't know how -p commandline option works, but I was able to figure out how -pe works. It allows you to give postion to feg and play against feg + feg will tell you what are possible moves + distance to mate in half moves. Nice.

You give position to feg in epd format. You put your position to file like here is my test file. Only one position.
name on file:
test.epd
and one line in file, can be done using notepad.
-----klip---
7k/8/8/8/8/8/1K6/Q7 w - -
-----klip---

Then I run feg: feg -pe test
And feg shows following screen:
M:\>feg -pe test
--------------------------------------------------------- FEG 3.03c 2002-Dec-26
name [test.EPD / 1]
anno []
rema []
- - - - - - - ZK . [ h8 .. .. .. .. .. .. .. ]
- - - - - - - - [ .. .. .. .. .. .. .. .. ]
- - - - - - - - ..
- - - - - - - - .. eps ..
- - - - - - - - .. chk +0
- - - - - - - - ..
- WK - - - - - - [ .. .. .. .. .. .. .. .. ]
WQ - - - - - - - * [ b2 a1 .. .. .. .. .. .. ]
straight [ +989 , +989]
mirrored [ +0 , +1000]

0 Qa1-a7 +990 6 Qa1-a6 == 12 Qa1-a4 == 18 Kb2-c1+ ==
1 Qa1-g1 == 7 Qa1-b1 == 13 Qa1-a8+ == 19 Kb2-b1+ ==
2 Kb2-b3+ +988 8 Qa1-e1 == 14 Qa1-c1 == 20 Kb2-a2+ ==
3 Kb2-c2+ == 9 Qa1-f1 == 15 Qa1-d1 ==
4 Qa1-a2 +986 10 Kb2-c3 == 16 Qa1-h1+ ==
5 Qa1-a5 == 11 Qa1-a3 +984 17 Kb2-a3+ ==

[quit, +, -, move#]>

Here I can quit, give move number or something else (+ or - commands, I don't know what these means)
Moves 0 and 1 are the best moves here. Value of the move 0 is +990 and value of move 1 is same (==).
I guess that mate is +1000 and +990 means 10 half moves to mate after this move, because when I give move 0 then next feg gives

0 Kh8-g8 +991 and after this
0 Kb2-c3 +992 and after this
0 Kg8-h8 +993 and finally I have

- - - - - - ZK - . [ g8 .. .. .. .. .. .. .. ]
WQ - - - - - - - [ .. .. .. .. .. .. .. .. ]
- - - - - WK - - ..
- - - - - - - - .. eps ..
- - - - - - - - .. chk +0
- - - - - - - - ..
- - - - - - - - [ .. .. .. .. .. .. .. .. ]
- - - - - - - - * [ f6 a7 .. .. .. .. .. .. ]
straight [ +999 , +999]
mirrored [ +0 , +1000]

0 Qa7-g7+ +1000 7 Qa7-b8+ +996 14 Qa7-a8+ == 21 Kf6-e5 ==
1 Qa7-b7 +998 8 Qa7-b6 == 15 Qa7-a6 == 22 Kf6-g5 ==
2 Qa7-c7 == 9 Qa7-c5 == 16 Qa7-a5 == 23 Kf6-f5 ==
3 Qa7-d7 == 10 Qa7-d4 == 17 Qa7-a4 == 24 Kf6-e6 ==
4 Qa7-e7 == 11 Qa7-e3 == 18 Qa7-a3 == 25 Kf6-e7 +994
5 Qa7-f7+ == 12 Qa7-f2 == 19 Qa7-a2+ == 26 Qa7-h7+ +0
6 Kf6-g6 == 13 Qa7-g1+ == 20 Qa7-a1 ==

I noticed that I have to have relevant feg generated tablebasefiles in feg directory. In this case I had KQK files in same directory.

I hope that someone finds this information useful.

P.S.
The name FEG stands for Final Endgame Generator. It allows you to
(surprisingly) generate Endgame Databases for use in Chessmaster 9000.
jkominek
Posts: 150
Joined: Mon Dec 04, 2006 9:02 am
Sign-up code: 0
Location: Pittsburgh, PA

Re: Undocumented feg feature

Post by jkominek »

Tuhma,

This is a nice find! And it might prove useful too.

You're right that value is 1000 - DTM (in ply). I presume that "eps" is enpassant status. "chk" appears to indicate the direction of the check. The + and - options allow you to move forwards and backwards in the move sequence that you execute. I don't get the "straight" and "mirrored" lines.

The tablebases supporting the position you want to examine have to be in the current directory, but FEG.exe can be elsewhere. One annoying aspect of FEG is that it doesn't accept a directory list for table locations, but oh well.

Since you're working alot with FEG, it's worth pointing out that the data format can represent a max dtm of 254 moves (this is mentioned in the readme file). Thus the krnknn file contains inaccurate information. More to the future, it means that FEG results cannot provide a perfect double check of all 7-man stats files. We'll cross that bridge when we get to it.

john
gambit3
Posts: 57
Joined: Mon Mar 06, 2006 8:06 am
Sign-up code: 0

Re: Undocumented feg feature

Post by gambit3 »

straight and mirrored lines are transpositions.

in fact, you can also use an epd database of positions, in which case the + and - become forward and backwards in the database of positions when shifted. -p commandline switch is same for pgn database of endings. these switches WERE in fact documented. they were originally designed for testing, and were instrumental in finding such errors as projecting checks when a pawn moved (which had some tbs being regenerated due to error. so only use tbs from feg that report v 3.03c, as earlier ones are not completely accurate. this also applies to any generator other than 3.03c or with any other date than 2002-dec-26 or any other file size than 152,576B....
those who can, do
those who can't, teach
Post Reply