Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question for you 0x88 folks

Author: Mikael Bäckman

Date: 23:56:43 03/24/04

Go up one level in this thread


On March 24, 2004 at 23:15:47, Ian Osgood wrote:

>On March 24, 2004 at 17:25:49, Mikael Bäckman wrote:
>
>>On March 24, 2004 at 16:58:02, Andreas Guettinger wrote:
>>
>>>On March 24, 2004 at 15:23:26, Dann Corbit wrote:
>>>
>>>>A lot of people seem to use the 16x8 board with 0x88.
>>>>
>>>>Very vew people seem to use the other half for anything useful.
>>>>
>>>>I am wondering, does anyone use the other half of the board to store data about
>>>>the square it duplicates?
>>>>
>>>>Seems like a very obvious enhancement to me.
>>>
>>>Interestingly I had exactly the same thoughts some days ago.
>>>
>>>I looked at some of my arrays[FIELDS] for piece values, mobility values etc
>>>where the right part of the tables are always empty. I wondered if you could not
>>>just put the values for white in the left half, the values for black in the
>>>right hlaf of the tables and just use (sq+8) to access the values for black?
>>>
>>>regards
>>>Andy
>>
>>
>>I do this for my evaluation piecesquare values and attacktables. It works fine,
>>but the code can get rather difficult to read. For example here's a bit of
>>Cheplas kingsafety code which tests who controls the '2 forward' squares:
>>
>>sq = kingSq[1];
>>if (OnBoard(sq + N + N)) {
>>	t = attCount[sq+N+N+8] - attCount[sq+N+N];
>>	if (t > 0) ac += t;
>>	if (OnBoard(sq + N + NW)) {
>>		t = attCount[sq+N+NW+8] - attCount[sq+N+NW];
>>		if (t > 0) ac += t;
>>	}
>>	if (OnBoard(sq + N + NE)) {
>>		t = attCount[sq+N+NE+8] - attCount[sq+N+NE];
>>		if (t > 0) ac += t;
>>	}
>>}
>>
>>
>>That '+8' is so easy to forget...
>>
>>/Mikael
>
>#define WhiteAttacks(sq) attCount[sq]
>#define BlackAttacks(sq) attCount[(sq)+8]
>
>I use board interleaving for all the eval's piece-square tables in my Forth 0x88
>program.
>
>As of yet, I haven't found anything useful to do with the other half of the main
>board.  (the squares are encoded  [000c cppp] where c is color and p is piece.
>
>Ian

I have on my todo list to create a #define WhiteTblValue(tbl, sq) (tbl[sq]). So
far I have been too lazy to use the editors search & replace function to replace
all the code. :)


/Mikael




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.