Skip to content

Commit

Permalink
Deployed 6e8f7fa with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Dec 24, 2024
1 parent f6e30f2 commit 181e040
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
23 changes: 20 additions & 3 deletions heuristics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h1 id="heuristics">Heuristics</h1>
</table>
<p>The evaluation features are used in several classes.</p>
<h2 id="evaluation-function">Evaluation Function</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 decimal numbers 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>
<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 numbers 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;
use Chess\FenToBoardFactory;
use Chess\Function\CompleteFunction;
Expand Down Expand Up @@ -367,7 +367,24 @@ <h2 id="evaluation-function">Evaluation Function</h2>

)
</code></pre>
<p>The relative value of a position in FEN format without considering checkmate can be obtained by adding the above values.</p>
<p>As chess champion William Steinitz pointed out, a strong position can be created by accumulating small advantages. The relative value of the position without considering checkmate is obtained by counting the advantages in the evaluation array.</p>
<pre><code class="language-php">use Chess\EvalArray;
use Chess\FenToBoardFactory;
use Chess\Function\CompleteFunction;

$fen = 'rnbqkb1r/p1pp1ppp/1p2pn2/8/2PP4/2N2N2/PP2PPPP/R1BQKB1R b KQkq -';

$board = FenToBoardFactory::create($fen);

$normd = EvalArray::normalization(new CompleteFunction(), $board);
$count = EvalArray::count($normd);

echo $count;
</code></pre>
<pre><code class="language-text">1
</code></pre>
<p>In this example, one evaluation feature is favoring White.</p>
<p>An alternative way to look at it is to add up the values ​​in the evaluation array.</p>
<pre><code class="language-php">use Chess\EvalArray;
use Chess\FenToBoardFactory;
use Chess\Function\CompleteFunction;
Expand All @@ -382,7 +399,7 @@ <h2 id="evaluation-function">Evaluation Function</h2>
</code></pre>
<pre><code class="language-text">0.24
</code></pre>
<p>In this example, White is slightly better than Black because the value obtained is a positive number.</p>
<p>White is slightly better than Black because the value obtained is a positive number.</p>
<p>This is an estimate that suggests who may be better without considering checkmate. Please note that a heuristic evaluation is not the same thing as a chess calculation. Heuristic evaluations are often correct but may fail because they are based on probabilities.</p>
<h2 id="oscillations-by-name-in-the-time-domain">Oscillations by Name in the Time Domain</h2>
<p><a href="https://github.com/chesslablab/php-chess/blob/main/tests/unit/SanHeuristicsTest.php">Chess\SanHeuristics</a> returns the continuous oscillations of an evaluation feature in the time domain.</p>
Expand Down
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 : 2024-12-24 15:40:58.932046+00:00
Build Date UTC : 2024-12-24 19:19:58.381776+00:00
-->
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 181e040

Please sign in to comment.