Search found 178 matches

by Harald
Mon Oct 15, 2012 4:20 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Chess game data structure in C
Replies: 12
Views: 2935

Re: Chess game data structure in C

Hi The code below is not in C or C++ but in Python. But it has the data structures that I used to parse one or many PGNs in a file. Then I build a big game tree from it counting win, draw and loss. That was an attempt to get an opening database or general statistics. I did a lot of work to recognize...
by Harald
Sat Oct 13, 2012 4:10 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Draw by 50 move rule or mate
Replies: 6
Views: 2139

Re: Draw by 50 move rule or mate

Thank you. Mate and stalemate have a higher priority than a draw by 50 move rule. Then I can use a function like this at the end or after the make_move() function: // Check position for draw or mate. // Insufficiant mating material is a draw. // The repetition table must include all previous moves t...
by Harald
Sat Oct 13, 2012 1:49 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Draw by 50 move rule or mate
Replies: 6
Views: 2139

Draw by 50 move rule or mate

While writing some search function I had this problem: What happens if a player makes a move that results in the last 50 moves having been played without any captures or pawn moves, but also gives checkmate? Is the game a win or a draw? [D]1k6/8/1K6/8/8/8/8/7R w - - 99 99 Is Rh8 a mate or a draw by ...
by Harald
Tue Sep 11, 2012 8:10 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft and en_passant
Replies: 6
Views: 2252

Re: Perft and en_passant

Thank you all. I found the error. And of course the wiki is right. I really did the test of pins through the moved and captured pawns. But I did not remove the ep captured pawns from one of the bitboards in a temporary test in the move generator. Then I used a generic attack function to avoid proble...
by Harald
Tue Sep 11, 2012 6:17 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft and en_passant
Replies: 6
Views: 2252

Perft and en_passant

Hi, Today I have played with perft after a long absence from chess programming. I have a problem with [D]8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - and the numbers given here: http://chessprogramming.wikispaces.com/Perft+Results The table gives the numbers for depth 5: 674624 nodes, 52051 captures, 1165 ...
by Harald
Thu Jul 19, 2012 6:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Aspiration Windows: Rubbish!
Replies: 56
Views: 14480

Re: Aspiration Windows: Rubbish!

I did not look at everything but this I saw immediately: Why is there an if (false) ? The for loop is gone and replaced by the do while (true) loop. Therefore the depth++ is missing. The depth-- in the fail high/low cases in my code were only there to repeat the search with new bounds but the same d...
by Harald
Wed Jul 18, 2012 7:44 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Aspiration Windows: Rubbish!
Replies: 56
Views: 14480

Re: Aspiration Windows: Rubbish!

I have examined my implementation, and hope this pseudo code may clear things up: void search() { InitEverything(); for (int depth = 1;;depth++) { if (depth <= 3) { alpha = -ValueInf; beta = +ValueInf; } else { alpha = last_search_value - 32; beta = last...
by Harald
Tue Jul 10, 2012 5:35 pm
Forum: Computer Chess Club: General Topics
Topic: A computer that learns the game by watching you play
Replies: 5
Views: 992

Re: A computer that learns the game by watching you play

You can always win against this computer. If you are in trouble just capture any piece of your opponent with any of your own pieces regardless of the piece positions or do another move you invent on the fly. If the computer "learns" the move and tries to use it against you tell him it is forbidden n...
by Harald
Sun Apr 22, 2012 8:43 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Your first chess program.
Replies: 43
Views: 8448

Re: Your first chess program.

I wrote my first chess program "HLSchach" 1990 on the Atari ST. It had a nice GEM GUI but the engine was poor and slow. It was never released. - The static evaluation was ok - Alpha-beta search without any tricks - No hash table - Poor move ordering, but I tried to dynamically sort good moves to th...
by Harald
Sat Apr 21, 2012 11:20 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Your first chess program.
Replies: 43
Views: 8448

Re: Your first chess program.

I wrote my first chess program "HLSchach" 1990 on the Atari ST. It had a nice GEM GUI but the engine was poor and slow. It was never released. - The static evaluation was ok - Alpha-beta search without any tricks - No hash table - Poor move ordering, but I tried to dynamically sort good moves to the...