Search found 3365 matches

by Sven
Mon Jan 11, 2021 5:12 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Weaker play with TT
Replies: 31
Views: 1337

Re: Weaker play with TT

I suppose you use separate 32-bit keys for the signature and the index, since JavaScript doesn't have a 64-bit type. For the signature you don't care what the sign is, it is only used for a comparison of numbers. You want the index to be within the range of the TT, though, which also means non-nega...
by Sven
Mon Jan 11, 2021 12:15 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Tapered Evaluation and MSE (Texel Tuning)
Replies: 109
Views: 2287

Re: Tapered Evaluation and MSE (Texel Tuning)

[...] I tune next param once the mse is improved. Also tried one side at a time that is, +1 if it fails try -1. If +1 improves the mse then go to the next param. I do roughly the same in Jumbo, and I am satisfied with the resulting convergence behaviour. With a small number of parameters, like 11 (...
by Sven
Thu Jan 07, 2021 6:04 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Problem with checkmate detection
Replies: 27
Views: 909

Re: Problem with checkmate detection

The arguments of the is_square_attacked are (square, color_to_move). It finds that it is in check and gives the correct checkmate attribute in the PV-line (if not if would give 0.5-0.5 since we would not be in check, no moves -> draw). Sounds ok, although I don't see why there is any reason to see ...
by Sven
Thu Jan 07, 2021 1:06 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Problem with checkmate detection
Replies: 27
Views: 909

Re: Problem with checkmate detection

What is the meaning of the second parameter of is_square_attacked()? The color of the potential attacker? If so, you should check the call in negamax().
by Sven
Fri Dec 18, 2020 1:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Bitboard board representation
Replies: 8
Views: 1133

Re: Bitboard board representation

You are right in general but your advice somehow contradicts to the OP's own statement "speed is important". Furthermore I doubt that saving time by doing less memory accesses is not relevant in a Python program. The saving may be smaller due to the interpreter overhead but it should still be measur...
by Sven
Thu Dec 17, 2020 7:24 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Bitboard board representation
Replies: 8
Views: 1133

Re: Bitboard board representation

Maintaining 2x6 piece bitboards, 2 color bitboards and one "all pieces" bitboard involves some redundancy. If you are looking for speed then you might try to avoid storing more information than needed, and let some information be calculated on the fly. Some examples: bbWhitePawns = bbPawns OR bbWhi...
by Sven
Thu Dec 17, 2020 7:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Bitboard board representation
Replies: 8
Views: 1133

Re: Bitboard board representation

Maintaining 2x6 piece bitboards, 2 color bitboards and one "all pieces" bitboard involves some redundancy. If you are looking for speed then you might try to avoid storing more information than needed, and let some information be calculated on the fly. Some examples: bbWhitePawns = bbPawns AND bbWhi...
by Sven
Mon Dec 07, 2020 11:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Complicating code in C#
Replies: 56
Views: 5362

Re: Complicating code in C#

If I would add an elephant then code should not break for fide chess which does not allow an elephant stepping on the chessboard I think one problem might be your choice of names: "Sort" is usually understood as something completely different from what you actually mean. Many people associate it wi...
by Sven
Sun Dec 06, 2020 10:02 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Draw and check mate detection
Replies: 5
Views: 633

Re: Draw and check mate detection

3. The main issue is during evaluation when I have to check for checkmate or draw. To do this I have to calculate all legal moves in the position, do the king check thing again, and see if there are any legal moves left after king moves are removed. If in check and no legal moves -> checkmate, if n...
by Sven
Sat Nov 07, 2020 4:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 137
Views: 59130

Re: Simplifying code

Why do you bother with a user interface for your chess engine? There are enough GUIs around so you only need to provide a working UCI or WB protocol support so that you can focus on the chess engine itself ...