diff --git a/data-mining/index.html b/data-mining/index.html index 19472726..a6d7bb4c 100644 --- a/data-mining/index.html +++ b/data-mining/index.html @@ -77,11 +77,7 @@
docker exec -itu 1000:1000 chess_data_php php cli/mine/fen.php "Anand,V"
This column is intended to store a text string of comma-separated values representing the chess positions in a game. It allows to search games by piece placement in FEN format.
-heuristics.php
heuristics.php
The example below populates the heuristics_mine
column with heuristics data on a player basis:
docker exec -itu 1000:1000 chess_data_php php cli/mine/heuristics.php "Anand,V"
This column is intended to store a JSON object representing the heuristics in a game. It allows to gather insights about the decisions that have been made to make the moves. With the data from the heuristics mine, you can take advantage of MySQL JSON functions to perform operations on JSON values like in the following examples.
-Fetch the material evaluation in all games won by Anand with the white pieces.
SELECT
JSON_EXTRACT(heuristics_mine, '$[0]')
@@ -145,7 +142,7 @@ Example
Chess\Function\FastFunction
Thus, $[0]
corresponds to the material evaluation in the fast function array.
-Example
+Example
Fetch the material evaluation for the tenth move (20 plies) in all games won by Anand with the black pieces.
SELECT
JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material
@@ -156,7 +153,7 @@ Example
AND Black = "Anand,V"
AND Result = '0-1';
-Example
+Example
Fetch the games won by Anand with the black pieces having a material disadvantage of at least 0.1 in the tenth move.
SELECT
movetext,
@@ -173,7 +170,7 @@ Example
HAVING
Material >= 0.1;
-Example
+Example
Convert a material evaluation array from JSON to MySQL for further processing.
SET
@j = (
@@ -195,7 +192,7 @@ Example
"$[*]" COLUMNS(balance FLOAT PATH "$")
) material;
-Example
+Example
Sum all elements in the previous material evaluation array.
SELECT
SUM(balance) as Sum
diff --git a/index.html b/index.html
index c57e5711..0de42354 100644
--- a/index.html
+++ b/index.html
@@ -230,5 +230,5 @@ Keyboard Shortcuts
diff --git a/search/search_index.json b/search/search_index.json
index 9a54a78b..371e6fb8 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Chess Data The simplest yet powerful MySQL chess database to learn and play chess online. Installation Clone the chesslablab/chess-data repo into your projects folder. Then cd the chess-data directory and create an .env file: cp .env.example .env Run the Docker container in detached mode in the background: docker compose up -d Update the .env file to your specific needs and create the chess database: docker exec -itu 1000:1000 chess_data_php php cli/db-create.php Bootstrapping The chess database consists of these tables: games , openings and users . The games table is to be seeded with PGN files, the openings table with CSV files, and the users table with fake random generated usernames. \ud83d\uddd3 games This table can be seeded with the PGN files contained in the data/example folder, and can be loaded either all at once or file by file as it is shown in the examples below. Seed the games table with all the files contained in the data/example folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. \u2713 597 games out of a total of 597 are OK. \u2717 1 games did not pass the validation. \u2713 1824 games out of a total of 1825 are OK. \u2713 3878 games out of a total of 3878 are OK. \u2713 4646 games out of a total of 4646 are OK. \u2717 2 games did not pass the validation. \u2713 2126 games out of a total of 2128 are OK. \u2713 2275 games out of a total of 2275 are OK. \u2713 1218 games out of a total of 1218 are OK. \u2713 827 games out of a total of 827 are OK. \u2717 5 games did not pass the validation. \u2713 1341 games out of a total of 1346 are OK. \u2713 5662 games out of a total of 5662 are OK. \u2713 3444 games out of a total of 3444 are OK. Seed the games table file by file: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example/Anand.pgn \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. The games table can also be seeded with your own set of PGN files in the data/games folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/games Please note that all files in the data folder are gitignored except those contained in data/example . The chess games won't be loaded into the database if containing PGN tags other than the ones supported by the tables created in the cli/db-create.php script. If that is the case you may want to remove the unsupported tags as shown in the example below. find . -name '*.pgn' -print0 | xargs -0 sed -i \"/\\[PlyCount .*\\]/d\" \ud83d\uddd3 openings This table is seeded with the CSV files contained in the data/openings folder. docker exec -itu 1000:1000 chess_data_php php cli/seed/openings.php data/openings \ud83d\uddd3 users This is how to seed the users table with fake random generated usernames: docker exec -itu 1000:1000 chess_data_php php cli/seed/users.php 5000","title":"Home"},{"location":"#chess-data","text":"The simplest yet powerful MySQL chess database to learn and play chess online.","title":"Chess Data"},{"location":"#installation","text":"Clone the chesslablab/chess-data repo into your projects folder. Then cd the chess-data directory and create an .env file: cp .env.example .env Run the Docker container in detached mode in the background: docker compose up -d Update the .env file to your specific needs and create the chess database: docker exec -itu 1000:1000 chess_data_php php cli/db-create.php","title":"Installation"},{"location":"#bootstrapping","text":"The chess database consists of these tables: games , openings and users . The games table is to be seeded with PGN files, the openings table with CSV files, and the users table with fake random generated usernames.","title":"Bootstrapping"},{"location":"#games","text":"This table can be seeded with the PGN files contained in the data/example folder, and can be loaded either all at once or file by file as it is shown in the examples below. Seed the games table with all the files contained in the data/example folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. \u2713 597 games out of a total of 597 are OK. \u2717 1 games did not pass the validation. \u2713 1824 games out of a total of 1825 are OK. \u2713 3878 games out of a total of 3878 are OK. \u2713 4646 games out of a total of 4646 are OK. \u2717 2 games did not pass the validation. \u2713 2126 games out of a total of 2128 are OK. \u2713 2275 games out of a total of 2275 are OK. \u2713 1218 games out of a total of 1218 are OK. \u2713 827 games out of a total of 827 are OK. \u2717 5 games did not pass the validation. \u2713 1341 games out of a total of 1346 are OK. \u2713 5662 games out of a total of 5662 are OK. \u2713 3444 games out of a total of 3444 are OK. Seed the games table file by file: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example/Anand.pgn \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. The games table can also be seeded with your own set of PGN files in the data/games folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/games Please note that all files in the data folder are gitignored except those contained in data/example . The chess games won't be loaded into the database if containing PGN tags other than the ones supported by the tables created in the cli/db-create.php script. If that is the case you may want to remove the unsupported tags as shown in the example below. find . -name '*.pgn' -print0 | xargs -0 sed -i \"/\\[PlyCount .*\\]/d\"","title":"\ud83d\uddd3 games"},{"location":"#openings","text":"This table is seeded with the CSV files contained in the data/openings folder. docker exec -itu 1000:1000 chess_data_php php cli/seed/openings.php data/openings","title":"\ud83d\uddd3 openings"},{"location":"#users","text":"This is how to seed the users table with fake random generated usernames: docker exec -itu 1000:1000 chess_data_php php cli/seed/users.php 5000","title":"\ud83d\uddd3 users"},{"location":"create-json-files/","text":"Create JSON Files The following commands will create JSON output for further use by other applications such as PHP Chess Server . Most played chess openings: php cli/json/most_played_openings.php > most_played_openings.json","title":"Create JSON Files"},{"location":"create-json-files/#create-json-files","text":"The following commands will create JSON output for further use by other applications such as PHP Chess Server . Most played chess openings: php cli/json/most_played_openings.php > most_played_openings.json","title":"Create JSON Files"},{"location":"data-mining/","text":"Data Mining Data mining provides an additional boost to the SQL queries that can be performed on the games table. The precondition for data mining is to seed the games table with data. The CLI commands described below are to populate the columns suffixed with the word _mine with pre-calculated data for further analysis. The algorithm used to mine the data may be more or less time-consuming. Diamonds Description \ud83d\udc8e The data mining command is not time-consuming \ud83d\udc8e\ud83d\udc8e The data mining command is not too time-consuming \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e The data mining command is time-consuming Please note the difference with the seed commands, which are meant for loading the tables with data. \ud83d\udc8e fen.php The example below populates the fen_mine column with chess positions in FEN format on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/fen.php \"Anand,V\" This column is intended to store a text string of comma-separated values representing the chess positions in a game. It allows to search games by piece placement in FEN format. \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e heuristics.php The example below populates the heuristics_mine column with heuristics data on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/heuristics.php \"Anand,V\" This column is intended to store a JSON object representing the heuristics in a game. It allows to gather insights about the decisions that have been made to make the moves. With the data from the heuristics mine, you can take advantage of MySQL JSON functions to perform operations on JSON values like in the following examples. Example Fetch the material evaluation in all games won by Anand with the white pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0]') FROM games WHERE heuristics_mine IS NOT NULL AND White = \"Anand,V\" AND Result = '1-0'; The index in the second parameter of the JSON_EXTRACT function $[0] corresponds to the index of the PHP Chess function being used in the cli/mine/heuristics.php script. See: Chess\\Function\\FastFunction Thus, $[0] corresponds to the material evaluation in the fast function array. Example Fetch the material evaluation for the tenth move (20 plies) in all games won by Anand with the black pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1'; Example Fetch the games won by Anand with the black pieces having a material disadvantage of at least 0.1 in the tenth move. SELECT movetext, JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1' GROUP BY Material, movetext HAVING Material >= 0.1; Example Convert a material evaluation array from JSON to MySQL for further processing. SET @j = ( SELECT JSON_EXTRACT(heuristics_mine, '$[0]') as Material FROM games WHERE heuristics_mine IS NOT NULL LIMIT 1 ); SELECT * FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material; Example Sum all elements in the previous material evaluation array. SELECT SUM(balance) as Sum FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material;","title":"Data Mining"},{"location":"data-mining/#data-mining","text":"Data mining provides an additional boost to the SQL queries that can be performed on the games table. The precondition for data mining is to seed the games table with data. The CLI commands described below are to populate the columns suffixed with the word _mine with pre-calculated data for further analysis. The algorithm used to mine the data may be more or less time-consuming. Diamonds Description \ud83d\udc8e The data mining command is not time-consuming \ud83d\udc8e\ud83d\udc8e The data mining command is not too time-consuming \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e The data mining command is time-consuming Please note the difference with the seed commands, which are meant for loading the tables with data.","title":"Data Mining"},{"location":"data-mining/#fenphp","text":"The example below populates the fen_mine column with chess positions in FEN format on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/fen.php \"Anand,V\" This column is intended to store a text string of comma-separated values representing the chess positions in a game. It allows to search games by piece placement in FEN format.","title":"\ud83d\udc8e fen.php"},{"location":"data-mining/#heuristicsphp","text":"The example below populates the heuristics_mine column with heuristics data on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/heuristics.php \"Anand,V\" This column is intended to store a JSON object representing the heuristics in a game. It allows to gather insights about the decisions that have been made to make the moves. With the data from the heuristics mine, you can take advantage of MySQL JSON functions to perform operations on JSON values like in the following examples.","title":"\ud83d\udc8e\ud83d\udc8e\ud83d\udc8e heuristics.php"},{"location":"data-mining/#example","text":"Fetch the material evaluation in all games won by Anand with the white pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0]') FROM games WHERE heuristics_mine IS NOT NULL AND White = \"Anand,V\" AND Result = '1-0'; The index in the second parameter of the JSON_EXTRACT function $[0] corresponds to the index of the PHP Chess function being used in the cli/mine/heuristics.php script. See: Chess\\Function\\FastFunction Thus, $[0] corresponds to the material evaluation in the fast function array.","title":"Example"},{"location":"data-mining/#example_1","text":"Fetch the material evaluation for the tenth move (20 plies) in all games won by Anand with the black pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1';","title":"Example"},{"location":"data-mining/#example_2","text":"Fetch the games won by Anand with the black pieces having a material disadvantage of at least 0.1 in the tenth move. SELECT movetext, JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1' GROUP BY Material, movetext HAVING Material >= 0.1;","title":"Example"},{"location":"data-mining/#example_3","text":"Convert a material evaluation array from JSON to MySQL for further processing. SET @j = ( SELECT JSON_EXTRACT(heuristics_mine, '$[0]') as Material FROM games WHERE heuristics_mine IS NOT NULL LIMIT 1 ); SELECT * FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material;","title":"Example"},{"location":"data-mining/#example_4","text":"Sum all elements in the previous material evaluation array. SELECT SUM(balance) as Sum FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material;","title":"Example"}]}
\ No newline at end of file
+{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Chess Data The simplest yet powerful MySQL chess database to learn and play chess online. Installation Clone the chesslablab/chess-data repo into your projects folder. Then cd the chess-data directory and create an .env file: cp .env.example .env Run the Docker container in detached mode in the background: docker compose up -d Update the .env file to your specific needs and create the chess database: docker exec -itu 1000:1000 chess_data_php php cli/db-create.php Bootstrapping The chess database consists of these tables: games , openings and users . The games table is to be seeded with PGN files, the openings table with CSV files, and the users table with fake random generated usernames. \ud83d\uddd3 games This table can be seeded with the PGN files contained in the data/example folder, and can be loaded either all at once or file by file as it is shown in the examples below. Seed the games table with all the files contained in the data/example folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. \u2713 597 games out of a total of 597 are OK. \u2717 1 games did not pass the validation. \u2713 1824 games out of a total of 1825 are OK. \u2713 3878 games out of a total of 3878 are OK. \u2713 4646 games out of a total of 4646 are OK. \u2717 2 games did not pass the validation. \u2713 2126 games out of a total of 2128 are OK. \u2713 2275 games out of a total of 2275 are OK. \u2713 1218 games out of a total of 1218 are OK. \u2713 827 games out of a total of 827 are OK. \u2717 5 games did not pass the validation. \u2713 1341 games out of a total of 1346 are OK. \u2713 5662 games out of a total of 5662 are OK. \u2713 3444 games out of a total of 3444 are OK. Seed the games table file by file: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example/Anand.pgn \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. The games table can also be seeded with your own set of PGN files in the data/games folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/games Please note that all files in the data folder are gitignored except those contained in data/example . The chess games won't be loaded into the database if containing PGN tags other than the ones supported by the tables created in the cli/db-create.php script. If that is the case you may want to remove the unsupported tags as shown in the example below. find . -name '*.pgn' -print0 | xargs -0 sed -i \"/\\[PlyCount .*\\]/d\" \ud83d\uddd3 openings This table is seeded with the CSV files contained in the data/openings folder. docker exec -itu 1000:1000 chess_data_php php cli/seed/openings.php data/openings \ud83d\uddd3 users This is how to seed the users table with fake random generated usernames: docker exec -itu 1000:1000 chess_data_php php cli/seed/users.php 5000","title":"Home"},{"location":"#chess-data","text":"The simplest yet powerful MySQL chess database to learn and play chess online.","title":"Chess Data"},{"location":"#installation","text":"Clone the chesslablab/chess-data repo into your projects folder. Then cd the chess-data directory and create an .env file: cp .env.example .env Run the Docker container in detached mode in the background: docker compose up -d Update the .env file to your specific needs and create the chess database: docker exec -itu 1000:1000 chess_data_php php cli/db-create.php","title":"Installation"},{"location":"#bootstrapping","text":"The chess database consists of these tables: games , openings and users . The games table is to be seeded with PGN files, the openings table with CSV files, and the users table with fake random generated usernames.","title":"Bootstrapping"},{"location":"#games","text":"This table can be seeded with the PGN files contained in the data/example folder, and can be loaded either all at once or file by file as it is shown in the examples below. Seed the games table with all the files contained in the data/example folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. \u2713 597 games out of a total of 597 are OK. \u2717 1 games did not pass the validation. \u2713 1824 games out of a total of 1825 are OK. \u2713 3878 games out of a total of 3878 are OK. \u2713 4646 games out of a total of 4646 are OK. \u2717 2 games did not pass the validation. \u2713 2126 games out of a total of 2128 are OK. \u2713 2275 games out of a total of 2275 are OK. \u2713 1218 games out of a total of 1218 are OK. \u2713 827 games out of a total of 827 are OK. \u2717 5 games did not pass the validation. \u2713 1341 games out of a total of 1346 are OK. \u2713 5662 games out of a total of 5662 are OK. \u2713 3444 games out of a total of 3444 are OK. Seed the games table file by file: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/example/Anand.pgn \u2717 2 games did not pass the validation. \u2713 4142 games out of a total of 4144 are OK. The games table can also be seeded with your own set of PGN files in the data/games folder: docker exec -itu 1000:1000 chess_data_php php cli/seed/games.php data/games Please note that all files in the data folder are gitignored except those contained in data/example . The chess games won't be loaded into the database if containing PGN tags other than the ones supported by the tables created in the cli/db-create.php script. If that is the case you may want to remove the unsupported tags as shown in the example below. find . -name '*.pgn' -print0 | xargs -0 sed -i \"/\\[PlyCount .*\\]/d\"","title":"\ud83d\uddd3 games"},{"location":"#openings","text":"This table is seeded with the CSV files contained in the data/openings folder. docker exec -itu 1000:1000 chess_data_php php cli/seed/openings.php data/openings","title":"\ud83d\uddd3 openings"},{"location":"#users","text":"This is how to seed the users table with fake random generated usernames: docker exec -itu 1000:1000 chess_data_php php cli/seed/users.php 5000","title":"\ud83d\uddd3 users"},{"location":"create-json-files/","text":"Create JSON Files The following commands will create JSON output for further use by other applications such as PHP Chess Server . Most played chess openings: php cli/json/most_played_openings.php > most_played_openings.json","title":"Create JSON Files"},{"location":"create-json-files/#create-json-files","text":"The following commands will create JSON output for further use by other applications such as PHP Chess Server . Most played chess openings: php cli/json/most_played_openings.php > most_played_openings.json","title":"Create JSON Files"},{"location":"data-mining/","text":"Data Mining Data mining provides an additional boost to the SQL queries that can be performed on the games table. The precondition for data mining is to seed the games table with data. The CLI commands described below are to populate the columns suffixed with the word _mine with pre-calculated data for further analysis. The algorithm used to mine the data may be more or less time-consuming. Diamonds Description \ud83d\udc8e The data mining command is not time-consuming. \ud83d\udc8e\ud83d\udc8e The data mining command is not too time-consuming. \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e The data mining command is time-consuming. Please note the difference with the seed commands, which are meant for loading the tables with data. CLI Commands \ud83d\udc8e fen.php The example below populates the fen_mine column with chess positions in FEN format on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/fen.php \"Anand,V\" This column is intended to store a text string of comma-separated values representing the chess positions in a game. It allows to search games by piece placement in FEN format. \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e heuristics.php The example below populates the heuristics_mine column with heuristics data on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/heuristics.php \"Anand,V\" This column is intended to store a JSON object representing the heuristics in a game. It allows to gather insights about the decisions that have been made to make the moves. With the data from the heuristics mine, you can take advantage of MySQL JSON functions to perform operations on JSON values like in the following examples. Example Fetch the material evaluation in all games won by Anand with the white pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0]') FROM games WHERE heuristics_mine IS NOT NULL AND White = \"Anand,V\" AND Result = '1-0'; The index in the second parameter of the JSON_EXTRACT function $[0] corresponds to the index of the PHP Chess function being used in the cli/mine/heuristics.php script. See: Chess\\Function\\FastFunction Thus, $[0] corresponds to the material evaluation in the fast function array. Example Fetch the material evaluation for the tenth move (20 plies) in all games won by Anand with the black pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1'; Example Fetch the games won by Anand with the black pieces having a material disadvantage of at least 0.1 in the tenth move. SELECT movetext, JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1' GROUP BY Material, movetext HAVING Material >= 0.1; Example Convert a material evaluation array from JSON to MySQL for further processing. SET @j = ( SELECT JSON_EXTRACT(heuristics_mine, '$[0]') as Material FROM games WHERE heuristics_mine IS NOT NULL LIMIT 1 ); SELECT * FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material; Example Sum all elements in the previous material evaluation array. SELECT SUM(balance) as Sum FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material;","title":"Data Mining"},{"location":"data-mining/#data-mining","text":"Data mining provides an additional boost to the SQL queries that can be performed on the games table. The precondition for data mining is to seed the games table with data. The CLI commands described below are to populate the columns suffixed with the word _mine with pre-calculated data for further analysis. The algorithm used to mine the data may be more or less time-consuming. Diamonds Description \ud83d\udc8e The data mining command is not time-consuming. \ud83d\udc8e\ud83d\udc8e The data mining command is not too time-consuming. \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e The data mining command is time-consuming. Please note the difference with the seed commands, which are meant for loading the tables with data.","title":"Data Mining"},{"location":"data-mining/#cli-commands","text":"","title":"CLI Commands"},{"location":"data-mining/#fenphp","text":"The example below populates the fen_mine column with chess positions in FEN format on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/fen.php \"Anand,V\" This column is intended to store a text string of comma-separated values representing the chess positions in a game. It allows to search games by piece placement in FEN format.","title":"\ud83d\udc8e fen.php"},{"location":"data-mining/#heuristicsphp","text":"The example below populates the heuristics_mine column with heuristics data on a player basis: docker exec -itu 1000:1000 chess_data_php php cli/mine/heuristics.php \"Anand,V\" This column is intended to store a JSON object representing the heuristics in a game. It allows to gather insights about the decisions that have been made to make the moves. With the data from the heuristics mine, you can take advantage of MySQL JSON functions to perform operations on JSON values like in the following examples.","title":"\ud83d\udc8e\ud83d\udc8e\ud83d\udc8e heuristics.php"},{"location":"data-mining/#example","text":"Fetch the material evaluation in all games won by Anand with the white pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0]') FROM games WHERE heuristics_mine IS NOT NULL AND White = \"Anand,V\" AND Result = '1-0'; The index in the second parameter of the JSON_EXTRACT function $[0] corresponds to the index of the PHP Chess function being used in the cli/mine/heuristics.php script. See: Chess\\Function\\FastFunction Thus, $[0] corresponds to the material evaluation in the fast function array.","title":"Example"},{"location":"data-mining/#example_1","text":"Fetch the material evaluation for the tenth move (20 plies) in all games won by Anand with the black pieces. SELECT JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1';","title":"Example"},{"location":"data-mining/#example_2","text":"Fetch the games won by Anand with the black pieces having a material disadvantage of at least 0.1 in the tenth move. SELECT movetext, JSON_EXTRACT(heuristics_mine, '$[0][19]') as Material FROM games WHERE heuristics_mine IS NOT NULL AND Black = \"Anand,V\" AND Result = '0-1' GROUP BY Material, movetext HAVING Material >= 0.1;","title":"Example"},{"location":"data-mining/#example_3","text":"Convert a material evaluation array from JSON to MySQL for further processing. SET @j = ( SELECT JSON_EXTRACT(heuristics_mine, '$[0]') as Material FROM games WHERE heuristics_mine IS NOT NULL LIMIT 1 ); SELECT * FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material;","title":"Example"},{"location":"data-mining/#example_4","text":"Sum all elements in the previous material evaluation array. SELECT SUM(balance) as Sum FROM JSON_TABLE( @j, \"$[*]\" COLUMNS(balance FLOAT PATH \"$\") ) material;","title":"Example"}]}
\ No newline at end of file
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index 6c59849b..2384fc72 100644
Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ