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 typos #15

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/generate_training_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ As all commands in stockfish `generate_training_data` can be invoked either from

It is recommended to set the `PruneAtShallowDepth` UCI option to `false` as it will increase the quality of fixed depth searches.

It is recommended to keep the `EnableTranspositionTable` UCI option at the default `true` value as it will make the generation process faster without noticably harming the uniformity of the data.
It is recommended to keep the `EnableTranspositionTable` UCI option at the default `true` value as it will make the generation process faster without noticeably harming the uniformity of the data.

`generate_training_data` takes named parameters in the form of `generate_training_data param_1_name param_1_value param_2_name param_2_value ...`.

Expand All @@ -24,7 +24,7 @@ Currently the following options are available:

`count` - the number of training data entries to generate. 1 entry == 1 position. Default: 8000000000 (8B).

`output_file_name` - the name of the file to output to. If the extension is not present or doesn't match the selected training data format the right extension will be appened. Default: generated_kifu
`output_file_name` - the name of the file to output to. If the extension is not present or doesn't match the selected training data format the right extension will be appended. Default: generated_kifu

`eval_limit` - evaluations with higher absolute value than this will not be written and will terminate a self-play game. Should not exceed 10000 which is VALUE_KNOWN_WIN, but is only hardcapped at mate in 2 (\~30000). Default: 3000

Expand Down
8 changes: 4 additions & 4 deletions docs/generate_training_data_nonpv.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ As all commands in stockfish `generate_training_data_nonpv` can be invoked eithe

It is recommended to set the `PruneAtShallowDepth` UCI option to `false` as it will increase the quality of fixed depth searches.

It is recommended to keep the `EnableTranspositionTable` UCI option at the default `true` value as it will make the generation process faster without noticably harming the uniformity of the data.
It is recommended to keep the `EnableTranspositionTable` UCI option at the default `true` value as it will make the generation process faster without noticeably harming the uniformity of the data.

`generate_training_data_nonpv` takes named parameters in the form of `generate_training_data_nonpv param_1_name param_1_value param_2_name param_2_value ...`.

Expand All @@ -16,13 +16,13 @@ Currently the following options are available:

`count` - the number of training data entries to generate. 1 entry == 1 position. Default: 1000000 (1M).

`exploration_min_nodes` - the min number of nodes to use for exploraton during selfplay. Default: 5000.
`exploration_min_nodes` - the min number of nodes to use for exploration during selfplay. Default: 5000.

`exploration_max_nodes` - the max number of nodes to use for exploraton during selfplay. The number of nodes is chosen from a uniform distribution between min and max. Default: 15000.
`exploration_max_nodes` - the max number of nodes to use for exploration during selfplay. The number of nodes is chosen from a uniform distribution between min and max. Default: 15000.

`exploration_save_rate` - the ratio of positions seen during exploration self play games that are saved for later rescoring. Default: 0.01 (meaning 1 in 100 positions seen during search get saved for rescoring).

`output_file` - the name of the file to output to. If the extension is not present or doesn't match the selected training data format the right extension will be appened. Default: generated_gensfen_nonpv
`output_file` - the name of the file to output to. If the extension is not present or doesn't match the selected training data format the right extension will be appended. Default: generated_gensfen_nonpv

`eval_limit` - evaluations with higher absolute value than this will not be written and will terminate a self-play game. Should not exceed 10000 which is VALUE_KNOWN_WIN, but is only hardcapped at mate in 2 (\~30000). Default: 4000

Expand Down
2 changes: 1 addition & 1 deletion docs/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Any name that doesn't designate an argument name or is not an argument will be i

`position_count` - the total number of positions in the file.

`king`, `king_square_count` - the number of times a king was on each square. Output is layed out as a chessboard, with the 8th rank being the topmost. Separate values for white and black kings.
`king`, `king_square_count` - the number of times a king was on each square. Output is laid out as a chessboard, with the 8th rank being the topmost. Separate values for white and black kings.

`move`, `move_from_count` - same as `king_square_count` but for from_sq(move)

Expand Down
2 changes: 1 addition & 1 deletion docs/transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Currently the following options are available:

`output_file` - path to the output file. Supports bin and binpack formats. Default: out.binpack.

`absolute` - states that the adjustment should be bounded by an absolute value. After this token follows the maximum absolute adjustment. Values are always adjusted towards scores in the input file. This is the default mode. Default maximum adjustement: 5.
`absolute` - states that the adjustment should be bounded by an absolute value. After this token follows the maximum absolute adjustment. Values are always adjusted towards scores in the input file. This is the default mode. Default maximum adjustment: 5.

`relative` - states that the adjustment should be bounded by a value relative in magnitude to the static eval value. After this token follows the maximum relative change - a floating point value greater than 0. For example a value of 0.1 only allows changing the static eval by at most 10% towards the score from the input file.

Expand Down
10 changes: 5 additions & 5 deletions src/extra/nnue_data_binpack_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -4619,8 +4619,8 @@ namespace chess
//
// these are special
// 12 : pawn with ep square behind (white or black, depending on rank)
// 13 : white rook with coresponding castling rights
// 14 : black rook with coresponding castling rights
// 13 : white rook with corresponding castling rights
// 14 : black rook with corresponding castling rights
// 15 : black king and black is side to move
//
// Let N be the number of bits set in occupied bitboard.
Expand Down Expand Up @@ -6559,11 +6559,11 @@ namespace binpack

// Write high bits of half move. This is a fix for the
// limited range of half move counter.
// This is backwards compatibile.
// This is backwards compatible.
stream.write_n_bit(pos.fullMove() >> 8, 8);

// Write the highest bit of rule50 at the end. This is a backwards
// compatibile fix for rule50 having only 6 bits stored.
// compatible fix for rule50 having only 6 bits stored.
// This bit is just ignored by the old parsers.
stream.write_n_bit(pos.rule50Counter() >> 6, 1);

Expand Down Expand Up @@ -6697,7 +6697,7 @@ namespace binpack

// Fullmove number, high bits
// This was added as a fix for fullmove clock
// overflowing at 256. This change is backwards compatibile.
// overflowing at 256. This change is backwards compatible.
fullmove |= stream.read_n_bit(8) << 8;

// Read the highest bit of rule50. This was added as a fix for rule50
Expand Down
2 changes: 1 addition & 1 deletion src/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ inline uint64_t mul_hi64(uint64_t a, uint64_t b) {

// This bitset can be accessed concurrently, provided
// the concurrent accesses are performed on distinct
// instances of underlying type. That means the cuncurrent
// instances of underlying type. That means the concurrent
// accesses need to be spaced by at least
// bits_per_bucket bits.
// But at least best_concurrent_access_stride bits
Expand Down
2 changes: 1 addition & 1 deletion src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,7 @@ bool Position::is_optional_game_end(Value& result, int ply, int countStarted) co

/// Position::is_immediate_game_end() tests whether the position ends the game
/// immediately by a variant rule, i.e., there are no more legal moves.
/// It does not not detect stalemates.
/// It does not detect stalemates.

bool Position::is_immediate_game_end(Value& result, int ply) const {

Expand Down
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ namespace Search
Value leafSearchEval = VALUE_NONE; // the evaluation from AB playout
float prior = 0.0f; // the policy, currently a rough estimation based on the playout of the parent
float actionValue = 0.0f; // the accumulated rewards
float actionValueWeight = 0.0f; // the maximum value for the accumulater rewards
float actionValueWeight = 0.0f; // the maximum value for the accumulator rewards
Move prevMove = MOVE_NONE; // the move on the edge from the parent
int numChildren = 0; // the number of legal moves, filled on expansion
int childId = 0; // the index of this node in the parent's children array
Expand Down
4 changes: 2 additions & 2 deletions src/tools/sfen_packer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ namespace Stockfish::Tools {

// Write high bits of half move. This is a fix for the
// limited range of half move counter.
// This is backwards compatibile.
// This is backwards compatible.
stream.write_n_bit(fm >> 8, 8);

// Write the highest bit of rule50 at the end. This is a backwards
// compatibile fix for rule50 having only 6 bits stored.
// compatible fix for rule50 having only 6 bits stored.
// This bit is just ignored by the old parsers.
stream.write_n_bit(pos.state()->rule50 >> 6, 1);

Expand Down
2 changes: 1 addition & 1 deletion src/tools/sfen_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ namespace Stockfish::Tools {

for(auto& sfen : sfens)
{
// The library uses a type that's different but layout-compatibile.
// The library uses a type that's different but layout-compatible.
binpack::nodchip::PackedSfenValue e;
std::memcpy(&e, &sfen, sizeof(binpack::nodchip::PackedSfenValue));
m_stream.addTrainingDataEntry(binpack::packedSfenValueToTrainingDataEntry(e));
Expand Down
6 changes: 3 additions & 3 deletions src/tools/training_data_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace Stockfish::Tools
}
}

// Output seed to veryfy by the user if it's not identical by chance.
// Output seed to verify by the user if it's not identical by chance.
std::cout << prngs[0] << std::endl;
}

Expand Down Expand Up @@ -323,7 +323,7 @@ namespace Stockfish::Tools
break;
}

// Always adjudivate by eval limit.
// Always adjudicate by eval limit.
// Also because of this we don't have to check for TB/MATE scores
if (abs(search_value) >= params.eval_limit)
{
Expand Down Expand Up @@ -406,7 +406,7 @@ namespace Stockfish::Tools
{
// Look into the position hashtable to see if the same
// position was seen before.
// This is a good heuristic to exlude already seen
// This is a good heuristic to exclude already seen
// positions without many false positives.
auto key = pos.key();
auto hash_index = (size_t)(key & (GENSFEN_HASH_SIZE - 1));
Expand Down
2 changes: 1 addition & 1 deletion src/tools/training_data_generator_nonpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace Stockfish::Tools
}
}

// Output seed to veryfy by the user if it's not identical by chance.
// Output seed to verify by the user if it's not identical by chance.
std::cout << prng << std::endl;
}

Expand Down
2 changes: 1 addition & 1 deletion src/variants.ini
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ startFen = n*nnnn*k/**pppp**/pp4pp/8/8/PP4PP/**PPPP**/K*NNNN*N w - - 0 1
stalemateValue = loss

# Elimination chess
# Eliminate all the opponents' pieces but one to win. No checkmates, capturing is compulsory
# Eliminate all the opponent's pieces but one to win. No checkmates, capturing is compulsory
# https://www.chess.com/variants/elimination-chess
[elimination:giveaway]
extinctionValue = loss
Expand Down
2 changes: 1 addition & 1 deletion tests/js/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ describe('ffish.setOption(name, value)', function () {
});

describe('ffish.setOptionInt(name, value)', function () {
it("it sets a int uci option value pair", () => {
it("it sets an int uci option value pair", () => {
ffish.setOptionInt("Threads", 4);
chai.expect(true).to.equal(true);
});
Expand Down