Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fen output for castling rights #122

Closed
wants to merge 1 commit into from

Conversation

glinscott
Copy link
Contributor

No description provided.

@mcostalba
Copy link

Could you please describe the fix and the test case in the log message?

@glinscott
Copy link
Contributor Author

This is a regression from 428962a

IMO the C++ stringstream functions are terrible and should not be used. But since they are, we have to cast to char here, otherwise the compiler interprets it as an integer, and writes a number.

@mcostalba
Copy link

Ok thanks.

Care to add this info to log message so for future reference?

On Mon, Nov 17, 2014 at 5:00 PM, Gary Linscott notifications@github.com
wrote:

This is a regression from 428962a
428962a

IMO the C++ stringstream functions are terrible and should not be used.
But since they are, we have to cast to char here, otherwise the compiler
interprets it as an integer, and writes a number.


Reply to this email directly or view it on GitHub
#122 (comment)
.

@lucasart
Copy link

I wouldn't go as far as saying that C++ streams shouldn't be used. This stream operator syntax deducting what to do from.the type system, allows SF I/O code to be concise and simple overall. But, in some cases, it's easy to fall into a trap (char+int=int)…

@zamar
Copy link

zamar commented Nov 18, 2014

approved.

@glinscott glinscott closed this in bffe32f Nov 18, 2014
niklasf pushed a commit to niklasf/Stockfish that referenced this pull request Nov 15, 2016
Alayan-stk-2 added a commit to Alayan-stk-2/Stockfish that referenced this pull request Feb 3, 2020
The center of the board is especially important because piece maneuvers between different parts of the board often involve crossing through the center. Limited space often means that the pieces get in each other's way and can't coordinate properly. By giving a bonus to each occupied or attacked square that the enemy doesn't attack in the 16 center squares of the board, this patch encourages to take more aggressively control of the center.

This term becomes much less useful if not detrimental in the endgame, when there isn't enough pieces left to contest the control of some squares, so a threshold of minor and major count is used to enable it, while the values goes down to 0 through a negative eg value. Tests without this method failed to provide an elo gain.

The conditions on relevant squares for the bonus, as the values for the bonus and the threshold, are mostly guesswork and could most likely be improved with elo gain.

ELO   | 4.18 +- 3.25 (95%)
SPRT  | 12.0+0.12s @ 1.275Mnps Threads=1 Hash=8MB
LLR   | 3.00 (-2.94, 2.94) [0.00, 5.00]
Games | N: 17720 W: 3696 L: 3483 D: 10541
http://chess.grantnet.us/viewTest/4484/

ELO   | 3.40 +- 2.67 (95%)
SPRT  | 60.0+0.6s @ 1.275Mnps Threads=1 Hash=64MB
LLR   | 2.95 (-2.94, 2.94) [0.00, 5.00]
Games | N: 20353 W: 3295 L: 3096 D: 13962
http://chess.grantnet.us/viewTest/4485/

BENCH : 7,681,536
@glinscott glinscott deleted the fix_to_fen branch August 12, 2020 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants