Author: Steven Edwards
Date: 00:47:49 04/29/05
Symbolic: Status report 2005.04.29 In the ChessLisp interpreter, I finished the implementation and testing of the DecodeEPD primitive. As with the DecodeFEN primitive, it takes a single operand describing a position. In the case of DecodeFEN, the string is a FEN specification. For the DecodeEPD function, the string is an entire EPD record. Unlike the DecodeFEN primitive that returns a position value, the DecodeEPD primitive returns an association list. Here's an example: Lisp (setf epdrec "rb3qk1/pQ3ppp/4p3/3P4/8/1P3N2/1P3PPP/3R2K1 w - - acd 12; acn 226541568; acs 3518; bm Qxa8 d6 dxe6 g3; id WAC.031; pes +3.417; pm dxe6; pv dxe6 fxe6 Ng5 Bxh2+ Kxh2 Qf4+ Kg1 Rf8 Nf3 Qb8 Rd7 Qxb7 Rxb7 a5 Rd7 Rc8; scv 58:37.81; solve 1;") "rb3qk1/pQ3ppp/4p3/3P4/8/1P3N2/1P3PPP/3R2K1 w - - acd 12; acn 226541568; acs 3518; bm Qxa8 d6 dxe6 g3; id WAC.031; pes +3.417; pm dxe6; pv dxe6 fxe6 Ng5 Bxh2+ Kxh2 Qf4+ Kg1 Rf8 Nf3 Qb8 Rd7 Qxb7 Rxb7 a5 Rd7 Rc8; scv 58:37.81; solve 1;" Lisp (setf epd (DecodeEPD epdrec)) ((bm #<Move Qxa8> #<Move d6> #<Move dxe6> #<Move g3>) (fpv . #<Pos 0x300e200>) (id . "WAC.031") (pm . #<Move dxe6>) (pv #<Move dxe6> #<Move fxe6> #<Move Ng5> #<Move Bxh2+> #<Move Kxh2> #<Move Qf4+> #<Move Kg1> #<Move Rf8> #<Move Nf3> #<Move Qb8> #<Move Rd7> #<Move Qxb7> #<Move Rxb7> #<Move a5> #<Move Rd7> #<Move Rc8>) (solve . 1)) Lisp (format t "%u%n" epd) ((bm Qxa8 d6 dxe6 g3) (fpv . rb3qk1/pQ3ppp/4p3/3P4/8/1P3N2/1P3PPP/3R2K1 w - - 0 1) (id . WAC.031) (pm . dxe6) (pv dxe6 fxe6 Ng5 Bxh2+ Kxh2 Qf4+ Kg1 Rf8 Nf3 Qb8 Rd7 Qxb7 Rxb7 a5 Rd7 Rc8) (solve . 1)) Lisp (ShowPVMono (vassocq fpv epd)) a b c d e f g h 8 bRbB :: bQbK:: 8 7 bPwQ:: ::bPbPbP 7 6 :: ::bP:: :: 6 5 :: ::wP:: :: 5 4 :: :: :: :: 4 3 ::wP:: ::wN:: 3 2 wP :: wPwPwP 2 1 :: ::wR:: wK 1 a b c d e f g h -------- Not all of the standard EPD opcodes are handled, only those required for the current genetic algorithm tuning subproject. More can be added later when needed. -------- With the DecodeEPD primitive working, I was able to complete the test suite loader. This is entirely in Lisp. It is not very fast as it takes several seconds to load a large annotated EPD file; but it only needs to do this during the genetic algorithm training and not during a search. Also, I had to add prepended underscores to the EPD association list tags to prevent some obscure naming conflicts. Lisp (setf ts (LoadTestSuite 'BWTC "OldResults/BWTC-60.epd")) ((IsA . TestSuite) (Count . 1001) (EPDVec . #<Vector>) (FileName . "OldResults/BWTC-60.epd") (Sym . BWTC)) Lisp (format t "%u%n" (vref (vassocq EPDVec ts) 0)) ((IsA . EPD) (_bm Qxf7+) (_fpv . r1b2rk1/pp1p1pp1/1b1p2B1/n1qQ2p1/8/5N2/P3RPPP/4R1K1 w - - 0 1) (_id . BWTC.0001) (_pm . Qxf7+) (_pv Qxf7+ Rxf7 Re8+ Rf8 Rxf8+ Kxf8 Re8#) (_solve . 1)) Lisp (format t "%u%n" (vref (vassocq EPDVec ts) 1000)) ((IsA . EPD) (_bm d4) (_fpv . 6b1/6b1/K1N5/npp3Q1/2k5/1n5R/B2P4/8 w - - 0 1) (_id . BWTC.1001) (_pm . d4) (_pv d4) (_solve . 1)) -------- More to come on the GA subproject for mating attack move suggestion productions.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.