Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: About qsearch...

Author: Uri Blass

Date: 03:16:18 12/29/01

Go up one level in this thread


On December 29, 2001 at 05:28:15, Rafael Andrist wrote:

>On December 28, 2001 at 16:04:46, Uri Blass wrote:
>
>>On December 28, 2001 at 15:13:14, Rafael Andrist wrote:
>>
>>>On December 28, 2001 at 13:46:32, Uri Blass wrote:
>>>
>>>>I have almost no experience with writing into text files in C and this is one of
>>>>the reason that I did not try to do the relevant program by myself and prefered
>>>>to concentrate on other things.
>>>
>>>its practically the same like writing text to stdout, use fprintf instead of
>>>printf
>>
>>I may try to do it later if I get no help but I think that the program that I
>>suggest may help many progrmammers because it is not dependent on the structure
>>of the program and it is very simple to use(only to add few lines in the right
>>place when the lines are the same for all programmers and to add a file that has
>>the relevant functions to the project).
>
>I think it is more efficient to implement it directly in search. To make a
>general tool would require another new communication protocol too.

You only need 2 functions

1)AddInitialPositionToTree(char position[80]);
This function get the FEN of the root of the tree


2)AddMoveToTree(char move[6];int ply;char* comments)
This function get the following information:

a)move algebric notation(for example e2e1Q or e8g8)
b)ply(if it is bigger by 1 than the previous call for this function you go
forward and if it is not bigger you can find how many plies to go backward based
on the difference)
c)a string of comments



>
>>A possible problem is the fact that I need to go back in the text and
>>I never used to go back when I used printf
>>
>>suppose the tree of the chess program includes 1.e2e4 c7c5 takeback c7c5,
>>takeback e2e4, e2e3
>>e2e3 should be written in the text file before c7c5 inspite of the fact
>>that e2e3 was generated after e2e4.
>
>So you want the last investigated variation first? This won't be very useful if
>you want to improve your move ordering.

I want a tree that chessbase interface can understand and it mean that the first
ply should be written before the second ply in the same line.

Correct me if I am wrong but I believe that
1.e2e4 1...c7c5 (1.e2e3) is not something that chessbase interface can
understand inspite of the fact that it is  the way that the program can search
so you need to push 1.e2e3 backward.

Here is an example for a tree that chessbase interface can understand(the
initial position is the root position in this case.
I told the interface
1.e3 only after 1...c5 but the interface purtted 1.e3 before 1...c5 in the text
file.

I changed 1.e4 to 1.e2e4 in the text file and the chessbase interface has no
problem to understand it but I suspect that if I change and put 1.e2e3 after
1...c7c5 the interface is not going to understand it.


[Event "Level=Blitz:4'+2". "]
[Site "COMPUTER - STORE"]
[Date "2001.12.28"]
[Round "?"]
[White "MICRON."]
[Black "Junior 7"]
[Result "*"]
[ECO "B20"]
[PlyCount "2"]
[EventDate "2001.12.28"]
[WhiteTeam "Czech Republic"]
[BlackTeam "Russia"]
[WhiteTeamCountry "RUS"]
[BlackTeamCountry "CZE"]

{64MB, shredder.ctg. Default
} 1. e2e4 (1. e2e3) (1. d2d3) 1... c7c5 (1... c7c6) *


Uri



This page took 0.01 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.