Skip to content

Instantly share code, notes, and snippets.

@antaz
Created September 12, 2024 00:45
Show Gist options
  • Select an option

  • Save antaz/5d8e0599c0a5331485f8c748b836fe70 to your computer and use it in GitHub Desktop.

Select an option

Save antaz/5d8e0599c0a5331485f8c748b836fe70 to your computer and use it in GitHub Desktop.
blaze_elo_testing.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyNawCtB4ixt4ryDn9HP2XRw",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/antaz/5d8e0599c0a5331485f8c748b836fe70/blaze_elo_testing.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"source": [
"# clone and build fastchess\n",
"%cd /content\n",
"!rm -rf fastchess\n",
"! git clone https://github.com/Disservin/fastchess\n",
"%cd fastchess\n",
"! make"
],
"metadata": {
"id": "bYlcLPdHDtvD"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# clone and build ordo\n",
"%cd /content\n",
"!rm -rf Ordo\n",
"!git clone --recurse-submodules https://github.com/michiguel/Ordo.git\n",
"%cd Ordo\n",
"! make"
],
"metadata": {
"id": "PblTFnLbJz40"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# download opening book\n",
"%cd /content\n",
"! rm -rf openings\n",
"! wget -O openings.zip \"https://cdn.discordapp.com/attachments/429710776282906625/536596158018224139/openings.zip?ex=66e3231d&is=66e1d19d&hm=52192218f8e12de29cc7e0fc1d343927172b680775c306a0479ac2e3ed62d1c7&\"\n",
"! unzip openings.zip -d openings"
],
"metadata": {
"id": "zFA7BICwKo0n"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "pAvRaviFCrZH"
},
"outputs": [],
"source": [
"# clone and build blaze (main)\n",
"%cd /content\n",
"! rm -rf blaze_main\n",
"! git clone https://github.com/antaz/blaze blaze_main\n",
"%cd blaze_main\n",
"! make"
]
},
{
"cell_type": "code",
"source": [
"# clone and build blaze (dev)\n",
"%cd /content\n",
"! rm -rf blaze\n",
"! git clone https://github.com/antaz/blaze\n",
"%cd blaze\n",
"! git checkout dev\n",
"! make"
],
"metadata": {
"id": "zYZwFAcWDQ96"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"%cd /content\n",
"! /content/fastchess/fastchess \\\n",
" -engine cmd=/content/blaze_main/build/release/blaze/blaze name=\"Blaze (main)\" \\\n",
" -engine cmd=/content/blaze/build/release/blaze name=\"Blaze (dev)\" \\\n",
" -each proto=uci tc=10+0 \\\n",
" -rounds 500 -repeat \\\n",
" -concurrency 1 \\\n",
" -sprt elo0=0 elo1=5 alpha=0.05 beta=0.05 \\\n",
" -openings file=/content/openings/openings-6ply-1000.pgn \\\n",
" -pgnout output.pgn"
],
"metadata": {
"id": "a25wwtmjEcfx"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"\n",
"%cd /content\n",
"! /content/Ordo/ordo -Q -D -a 0 -A \"Blaze (dev)\" -W -n8 -s1000 -U \"0,1,2,3,4,5,6,7,8,9,10\" -j h2h.txt -C matrix.csv -p output.pgn"
],
"metadata": {
"id": "dwIMgPDHUqs8"
},
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment