Search found 17953 matches

by hgm
Wed Apr 25, 2007 12:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Two small in-register-lookups
Replies: 15
Views: 14508

Re: Two small in-register-lookups

The important thing is whether it is possible for the opponent has no way to exchange the knight. If the knight is well placed, supported by a pawn, cannot be driven away by a pawn, and the opponent has no minor piece which can ever move to the square of the knight (i.e. no minor pieces at all or j...
by hgm
Wed Apr 25, 2007 10:34 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Chess on the Pico Edition XGamestation
Replies: 9
Views: 7906

Re: Chess on the Pico Edition XGamestation

Says that they had to expand the ROM from 2K to 4K, though. I guess a lot depends on how much of that ROM you need for generating the video image of the board display. As for the 136 bytes of RAM: due to size restrictions you will probably be forced to represent the board as a packed array of nybble...
by hgm
Wed Apr 25, 2007 9:49 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Two small in-register-lookups
Replies: 15
Views: 14508

Re: Two small in-register-lookups

Well, like Gerd says, it is mainly a bit-twiddling addiction. We don't do it because we need it to program Chess engines, but we do Chess programming because it provides us with a nice set of opportunities to come up with twiddles like this... :lol: :lol: :lol: Upto now Joker only used the square co...
by hgm
Tue Apr 24, 2007 9:48 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Two small in-register-lookups
Replies: 15
Views: 14508

Re: Two small in-register-lookups

You can XOR the squares first, and then do the test for one square.

Code: Select all

bool sameSquareColor(unsigned int sq1, unsigned int sq2) { 
    sq1 ^= sq2;
    return  ( (0xAA55AA55 >> sq1) & 1); 
}
by hgm
Tue Apr 24, 2007 12:37 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Two small in-register-lookups
Replies: 15
Views: 14508

Re: Two small in-register-lookups

You could of course replace the (sqr>>3^sqr)&1 by

Code: Select all

9*sqr & 8

for the purpose of making a boolean.

The multiplication could be implemented with a single LEA instruction:

Code: Select all

    movl  _sqr, %eax
    leal (%eax, %eax, 8), %eax
    andl  $8, %eax
by hgm
Tue Apr 24, 2007 9:51 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Two small in-register-lookups
Replies: 15
Views: 14508

Re: Two small in-register-lookups

Why would you want to use in-register lookups? Fetching such simple things from a memory table should be very competative, if not faster. I noticed that these out-of-order CPUs often perform very poorly if you only use registers, it seems that there is some internal bottleneck on how many registers ...
by hgm
Mon Apr 23, 2007 12:54 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Eden and my status
Replies: 12
Views: 12123

Re: Eden and my status

Instead, in my quest for knowledge in areas I have no clue about, I have ordered the Pico Edition of the XGamestation ( http://www.xgamestation.com/view_product.php?id=34 ), a "retro" game console that you can build yourself. I'm planning to write a chess program for it, just to see what I can achi...
by hgm
Thu Apr 19, 2007 4:02 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Eden and my status
Replies: 12
Views: 12123

Re: Eden and my status

Yes, I am also such a risk taker. Before going on holiday, I made a copy of the Joker sources on an USB stick. But if my house would have burned, that would not have prevented it from being lost.

I really should find a better solution to this, e.g. e-mail it to myself at work.
by hgm
Wed Apr 18, 2007 7:45 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Material imbalance evaluation
Replies: 10
Views: 13490

Re: Material imbalance evaluation

The most advanced theoretical considerations on ab-initio piece-value determination I have seen were by Ralph Betza. Apart from mobility, he also defined concepts such as 'forwardness' that seem to be important for piece strength. E.g. a piece that does only one diagonal step (Ferz) and a piece that...
by hgm
Tue Apr 17, 2007 8:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Material imbalance evaluation
Replies: 10
Views: 13490

Re: Material imbalance evaluation

I just did an interesting experiment in uMax concerning piece values. The standard version always used the 'classical' values 1,3,3,5,9. As uMax fails to correct for piece-square points of the captured piece, this makes trades of B vs N, B or N vs 3P, 2B vs R+P completely equal, and therefore often ...