Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move Generation

Author: Scott Gasch

Date: 09:26:01 02/23/05

Go up one level in this thread


On February 23, 2005 at 11:33:54, Mathieu Pagé wrote:

>On February 22, 2005 at 20:35:28, Scott Gasch wrote:
>
>>One thing that helped (and helps) me a lot is a chess tree viewer.  I started by
>>just dumping XML code out of search and using a web browser to view it as a
>>tree.  Both IE and mozilla do a reasonable job allowing you to expand/contract
>>branches etc...
>>
>>Then I got tired of this solution and hacked something together to give me a
>>tree control and call winboard to show me the FEN when I clicked on it.  I use
>>this all the time when I'm thinking about pruning etc...
>>
>>The reason for this tip is that I strongly suspect your problem is in search and
>>not move gen.  Even if you wrote a terribly slow move generator you should not
>>be taking 3 seconds to get a 4 ply search.  I bet you're searching a ton of
>>nodes and need to look at your move ordering / search tree.
>>
>>Scott
>
>I scott, I thought of doign this.
>
>Can you post a sample xml file so I can see how you do it ?
>
>Mahtieu P.

Well the nice thing about XML is you can make up your own format.  A word of
advice on this, though, is keep it short.  You're going to be dumping hundreds
of thousands of nodes into this file so its very easy to get an enormous tree
file if you don't make an effort to keep it in check.  As it is my tree viewer
can't handle more than about a 4-5 ply search.  I could code it up to only
expand one branch of the XML at a time but it suits my purposes as-is.  Here's
some XML from my engine...

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<search>
<node num="1">
<move name="Rd2 (g)">
    <qnode num="2">
    <FEN val="4R3/p4ppk/1p1P2p1/8/P4PP1/BP3p1q/3R1P2/Q5K1 b  - - 6 0" />
    <info window="-32767, 32767" tip="ply 1, depth 0" />
    <eval score="-1586" />
    <pos x="286" />
    <info val="non-check futility value 0" />
    <move name="Qxg4+ (g)" val="1073741968">
        <qnode num="3">
        <FEN val="4R3/p4ppk/1p1P2p1/8/P4Pq1/BP3p2/3R1P2/Q5K1 w  - - 0 0" />
        <info window="-32767, 1586" tip="ply 2, depth 0" />
        <move name="Kh2 (g)" val="0">
            <qnode num="4">
            <FEN val="4R3/p4ppk/1p1P2p1/8/P4Pq1/BP3p2/3R1P1K/Q7 b  - - 1 0" />
            <info window="-1586, 32767" tip="ply 3, depth 0" />
            <eval score="-1476" />
            <pos x="284" />
            <info val="non-check futility value 0" />
            <move name="Qxf4+ (g)" val="1073741968">
                <qnode num="5">
                <FEN val="4R3/p4ppk/1p1P2p1/8/P4q2/BP3p2/3R1P1K/Q7 w  - - 0 0" /
>
                <info window="-32767, 1476" tip="ply 4, depth 0" />
...

(remember to close all this stuff with a </move> or </node> or whatever.  The
tags that are like: <foo bar="baz" /> are closed already).

If you make a legal XML file (i.e. you close all your tags) then you can just
load this thing into a web browser and get a primitive "tree viewing" ability.

Good luck,
Scott



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.