Skip to content

Commit

Permalink
Deployed 5f0a459 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Jan 5, 2025
1 parent b34f804 commit c8978a2
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
13 changes: 7 additions & 6 deletions heuristics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ <h1 id="heuristics">Heuristics</h1>
</tr>
</tbody>
</table>
<p>The evaluation features are used in several classes.</p>
<h2 id="evaluate-a-chess-position">Evaluate a Chess Position</h2>
<p><a href="https://github.com/chesslablab/php-chess/blob/main/tests/unit/EvalArrayTest.php">Chess\EvalArray</a> allows to transform a FEN position to a normalized array of values between -1 and +1. -1 is the best possible evaluation for Black and +1 the best possible evaluation for White. Both forces being set to 0 means they're balanced.</p>
<pre><code class="language-php">use Chess\EvalArray;
Expand Down Expand Up @@ -381,7 +380,9 @@ <h3 id="steinitz-evaluation">Steinitz Evaluation</h3>
<pre><code class="language-text">1
</code></pre>
<p>In this example, White is better than Black because the value obtained is a positive number. One evaluation feature is favoring White.</p>
<p>The Steinitz evaluation alone has proven to be quite accurate as a relative estimate for chess positions in a way that is easy for human players to understand and to learn. However, it can be complemented with other statistical measures such as the mean, median, mode, and standard deviation of the evaluation array without counting the zeros.</p>
<p>Chess evaluation functions often consist in multiplying the terms by a weight and adding the results to construct a linear combination.</p>
<p><img alt="Figure 1" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_01.png" /></p>
<p>However, the Steinitz evaluation alone, which is to say just counting the advantages, has proven to be quite accurate as a relative estimate for chess positions in a way that is easy for human players to understand and to learn. Also it can be complemented with other statistical measures such as the mean, median, mode, and standard deviation of the evaluation array without counting the zeros.</p>
<h3 id="mean">Mean</h3>
<p>The mean represents the center of the evaluation array being intermediate to the extreme values.</p>
<pre><code class="language-php">$mean = EvalArray::mean($f, $board);
Expand Down Expand Up @@ -439,7 +440,7 @@ <h2 id="plot-the-oscillations-of-a-game">Plot the Oscillations of a Game</h2>
[4] =&gt; -1
)
</code></pre>
<p><img alt="Figure 1" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_01.png" /></p>
<p><img alt="Figure 2" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_02.png" /></p>
<p>The data is plotted in a way that is easy for chess players to understand and learn.</p>
<h2 id="extract-chess-data">Extract Chess Data</h2>
<p>Given a PGN movetext in SAN format, <a href="https://github.com/chesslablab/php-chess/blob/main/tests/unit/SanExtractorTest.php">Chess\SanExtractor</a> returns the oscillations of all evaluation features for data analysis purposes like the following example.</p>
Expand Down Expand Up @@ -493,7 +494,7 @@ <h3 id="evaluation-array">Evaluation Array</h3>
[31] =&gt; 0
)
</code></pre>
<p><img alt="Figure 2" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_02.png" /></p>
<p><img alt="Figure 3" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_03.png" /></p>
<p>The evaluation array can be plotted in a way that is easy for chess players to understand and learn.</p>
<h3 id="mean_1">Mean</h3>
<pre><code class="language-php">$mean = SanExtractor::mean($f, $board, $movetext);
Expand All @@ -508,7 +509,7 @@ <h3 id="mean_1">Mean</h3>
[4] =&gt; -0.0657
)
</code></pre>
<p><img alt="Figure 3" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_03.png" /></p>
<p><img alt="Figure 4" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_04.png" /></p>
<h3 id="standard-deviation_1">Standard Deviation</h3>
<pre><code class="language-php">$sd = SanExtractor::sd($f, $board, $movetext);

Expand All @@ -523,7 +524,7 @@ <h3 id="standard-deviation_1">Standard Deviation</h3>
[4] =&gt; -0.5406
)
</code></pre>
<p><img alt="Figure 4" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_04.png" /></p>
<p><img alt="Figure 5" src="https://raw.githubusercontent.com/chesslablab/php-chess/main/docs/heuristics_05.png" /></p>
<p>🎉 So chess positions and games can be plotted on charts and processed with machine learning techniques. Become a better player by extracting knowledge from games with the help of <a href="https://chesslablab.github.io/chess-data/data-mining/">Data Mining</a> tools.</p></div>
</div>
</div>
Expand Down
Binary file modified heuristics_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified heuristics_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified heuristics_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified heuristics_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added heuristics_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.5.3
Build Date UTC : 2025-01-03 20:16:08.340431+00:00
Build Date UTC : 2025-01-05 12:08:03.346937+00:00
-->
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://chesslablab.github.io/php-chess/</loc>
<lastmod>2025-01-03</lastmod>
<lastmod>2025-01-05</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://chesslablab.github.io/php-chess/chess-tutor/</loc>
<lastmod>2025-01-03</lastmod>
<lastmod>2025-01-05</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://chesslablab.github.io/php-chess/format-converters/</loc>
<lastmod>2025-01-03</lastmod>
<lastmod>2025-01-05</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://chesslablab.github.io/php-chess/getting-started/</loc>
<lastmod>2025-01-03</lastmod>
<lastmod>2025-01-05</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://chesslablab.github.io/php-chess/heuristics/</loc>
<lastmod>2025-01-03</lastmod>
<lastmod>2025-01-05</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://chesslablab.github.io/php-chess/play-chess/</loc>
<lastmod>2025-01-03</lastmod>
<lastmod>2025-01-05</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit c8978a2

Please sign in to comment.