go-engine-tester
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -84,12 +84,14 @@ "use strict"; | ||
let winnerConfig = winnerColor === "b" ? (swaps ? config2 : config1) : (swaps ? config1 : config2); | ||
results.push({ | ||
winnerColor: winnerColor, | ||
winnerConfig: winnerConfig | ||
}); | ||
gtpMoves.forEach(m => console.log(m)); | ||
console.log(`Winner: ${winnerColor}`); | ||
console.log(`Winner: ${winnerConfig.name} ${winnerColor}`); | ||
await controller1.stop(); | ||
await controller2.stop(); | ||
results.push({ | ||
winnerColor: winnerColor, | ||
winnerConfig: (winnerColor === "b" ? (swaps ? config2 : config1) : (swaps ? config1 : config2)) | ||
}); | ||
}; | ||
@@ -102,3 +104,4 @@ | ||
} | ||
console.log("============================================================"); | ||
results.forEach((m, index) => console.log(`${index} Winner: ${m.winnerConfig.name} ${m.winnerColor}`)); | ||
})(); |
{ | ||
"name": "go-engine-tester", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Go (围棋, 囲碁, 바둑) engine tester", | ||
@@ -5,0 +5,0 @@ "keywords": ["go", "engine", "test"], |
# Introduction | ||
This program runs a batch of games between 2 GTP-compatible Go (围棋, 囲碁, 바둑) engines to compare their strength. It can also compare the strength under different options of the same engine. | ||
This program can compare the strength of two Go (围棋, 囲碁, 바둑) engines that are GTP-compatible by running a batch of games between them. It can also compare the strength under different options of the same engine. | ||
# Install | ||
# Requirements | ||
```bash | ||
npm install go-engine-tester -g | ||
``` | ||
- Node.js 8 or higher installed. | ||
@@ -16,3 +14,3 @@ # Usage | ||
```bash | ||
go-engine-tester config.json | ||
npx go-engine-tester config.json | ||
``` | ||
@@ -38,3 +36,3 @@ | ||
This will play 30 games between the first engine and the second engine, and finally print the result. | ||
This will play 30 games between the first engine and the second engine, and finally print the result. Note that the path in `command` is relative to the working directory not the config file. | ||
@@ -41,0 +39,0 @@ There's an optional `spawnOptions` attribute, so that it could pass environment variables to the engine processes: |
6629
88
64