Search found 323 matches

by Karlo Bala
Sat Jul 31, 2021 8:43 pm
Forum: Computer Chess Club: General Topics
Topic: It is White to play what do you play here ?
Replies: 8
Views: 436

Re: It is White to play what do you play here ?

Please do not cheat by using one of your top engines. this puzzle was given to a 10 years old prodigy and he solved it in 5 seconds. I noticed that the majority of of the members of this forum are lazy and immediately use their engine, but remember this was solved by a 10 years old prodigy 7 years ...
by Karlo Bala
Wed Jul 28, 2021 7:34 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Weird Behavior in Quiescence Search
Replies: 9
Views: 1042

Re: Weird Behavior in Quiescence Search

In Bit-Genie I avoid going into Qsearch if the king is in check, a kind of check extension I replaced the (somewhat dumb) line if (num_moves == 0) return eval; with if (b.is_check()) return eval; and it seems to work. Should I be returning the static evaluation in this case, or alpha? Quick and dir...
by Karlo Bala
Wed Jul 28, 2021 1:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Weird Behavior in Quiescence Search
Replies: 9
Views: 1042

Re: Weird Behavior in Quiescence Search

Howdy everyone - I hope you're having a fantastic day so far! I'm working on my engine right now and have been facing some weird bugs that all have to do with qsearch (whenever I don't use it, everything works perfectly): if I run 'go depth 6', followed by 'go depth 8' and 'go depth 9' (on the same...
by Karlo Bala
Mon Jul 05, 2021 2:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Evaluation
Replies: 17
Views: 3178

Re: Evaluation

Tuning the engine against a particular position is (almost) always a bad idea...

Moreover, this position is tactical, even if it does not look like that (Ng2->Bh3->Qf3...)
by Karlo Bala
Thu Jul 01, 2021 12:17 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How can i improve my C# engine speed?
Replies: 58
Views: 8513

Re: How can i improve my C# engine speed?

So.. do you think having an array of pieces in board will be better? right? I think it is a good idea to add a mailbox board if you already have a working bitboard engine. It will cost you less than an hour of work and will simplify your code in many places. There is nothing worse than bloated code...
by Karlo Bala
Wed Jun 30, 2021 9:58 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How can i improve my C# engine speed?
Replies: 58
Views: 8513

Re: How can i improve my C# engine speed?

Hello, i am really happy with the results that i'm getting so far, but the speed is still not that great For example in Kiwipete position: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - it does a search of depth 9 with this results: Nodes searched: 1286811 Search time: 12596ms ( ~...
by Karlo Bala
Sun Mar 07, 2021 12:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Are Bitboards More Intoxicating Than They Are Good?
Replies: 60
Views: 8779

Re: Are Bitboards More Intoxicating Than They Are Good?

Indeed, bitscan methods can be much faster than loops over all bits. What I don't understand is why you would want to do this with any significant frequency. (I can imagine you would do it in the FEN reader for setting up a new position.) Even the twice faster codes loops over 2 x 64 squares to set...
by Karlo Bala
Sun Feb 14, 2021 8:12 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Thought bitboards was faster :-)
Replies: 38
Views: 7110

Re: Thought bitboards was faster :-)

In the two functions in move.c //fill a square 'sq' whith a piece 'p' of color 'c' void fill_sq(int c, int sq, int p) { //update hash code hash_position ^= hash_table[p][sq]; //update position echiquier[sq] = p; //bitboardS set_bit(bb, sq, ALP); clear_bit(bb, sq, NOP); if(c == BLANC) { set_bit(bb, ...
by Karlo Bala
Sun Feb 14, 2021 3:31 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: TT: key collisions
Replies: 15
Views: 2240

Re: TT: key collisions

I've just finished a couple refactorings in preparation for adding a transposition table to my engine. I'm now modeling castling rights in my game state (vs. using a moved bit), and both the game state and move now fit in native integers respectively. I've read the Mediocre TT Guide that @Nomis men...
by Karlo Bala
Sun Feb 14, 2021 3:17 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Thought bitboards was faster :-)
Replies: 38
Views: 7110

Re: Thought bitboards was faster :-)

Bitboards are not automagically faster, but most often open up some possiblities for further optimizations. For example, your function void set_bit(U64 *pbitboard, int y, int type) { U64 x = pbitboard[type]; x = (BIT[y] | x); pbitboard[type] = x; } could be simplified into pbitboard[type] |= (U64)1...