Skip to content

Commit c6a8172

Browse files
committed
Merge pull request #163 from ujh/release-0.2.2
Release 0.2.2
2 parents 29a0a06 + c30288d commit c6a8172

File tree

8 files changed

+52
-26
lines changed

8 files changed

+52
-26
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
target/
2-
*-benchmark*
32
.project
3+
4+
# Ignore gogui-twogtp output in the root directory
5+
/*.sgf
6+
/*.dat
7+
/*.html
8+
/*.lock

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.2.2 [](https://github.com/ujh/iomrascalai/compare/0.2.1...master) (unreleased)
1+
## 0.2.2 [](https://github.com/ujh/iomrascalai/compare/0.2.1...0.2.2)
22

33
* A two liberty solver (can prove if a group with up to two stones is
44
dead)
@@ -10,9 +10,14 @@
1010

1111
### Performance
1212

13-
After running 100 games on 9x9 with komi 6.5 and a time limit of 5
14-
minutes (sudden death) the win rate against GnuGo 3.8 level 0 was **X%
15-
± Y%** for the default engine with 8 threads.
13+
After running 200 games on 9x9 with komi 6.5 and a time limit of 5
14+
minutes (sudden death) the win rate against GnuGo 3.8 level 0 was **70%
15+
± 3.2%** for the default engine with 8 threads.
16+
17+
After running 200 games on 13x13 with komi 6.5 and a time limit of 10
18+
minutes (sudden death) the win rate against GnuGo 3.8 level 0 was **11%
19+
± 2.2%** for the default engine with 8 threads.
20+
1621

1722
## 0.2.1 [](https://github.com/ujh/iomrascalai/compare/0.2.0...0.2.1)
1823

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
description = "An AI for the game of Go"
44
name = "iomrascalai"
5-
version = "0.2.2-rc1"
5+
version = "0.2.2"
66
authors = ["Urban Hafner <contact@urbanhafner.com>",
77
"Thomas Poinsot <thomas.poinsot1@gmail.com>",
88
"Igor Polyakov <iopguy+iomrasclai@gmail.com>"]

bin/benchmark

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,38 @@
33
DIR=$( cd $(dirname "${BASH_SOURCE[0]}") && pwd )
44
cd "$DIR/.."
55

6-
set -ex
6+
set -x
77

8-
FN="gnugo-benchmark"
8+
SHA=`git rev-parse HEAD`
99

1010
cargo build --release
11-
rm -f $FN*
1211

1312
THREADS=8
1413

1514
GNUGO="gnugo --mode gtp --level 0 --chinese-rules --positional-superko --capture-all-dead --score aftermath --play-out-aftermath"
1615
IOMRASCALAI="./target/release/iomrascalai -r chinese -t $THREADS -l"
1716
REFEREE="$GNUGO"
1817
SIZE=9
19-
GAMES=100
18+
GAMES=200
2019
TIME="5m"
2120

21+
FN="$SHA-9x9"
22+
23+
gogui-twogtp -auto -black "$GNUGO" -white "$IOMRASCALAI" \
24+
-size $SIZE -alternate -games $GAMES -sgffile $FN \
25+
-time $TIME -referee "$REFEREE" -verbose -debugtocomment
26+
rm -f $FN.html
27+
gogui-twogtp -analyze $FN.dat
28+
29+
30+
31+
32+
SIZE=13
33+
TIME="10m"
34+
FN="$SHA-13x13"
35+
2236
gogui-twogtp -auto -black "$GNUGO" -white "$IOMRASCALAI" \
2337
-size $SIZE -alternate -games $GAMES -sgffile $FN \
2438
-time $TIME -referee "$REFEREE" -verbose -debugtocomment
39+
rm -f $FN.html
2540
gogui-twogtp -analyze $FN.dat

src/config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ impl Config {
130130
priors: UctPriorsConfig {
131131
capture_many: 30,
132132
capture_one: 15,
133-
empty: 10,
133+
empty: 20,
134134
neutral_plays: 10,
135135
neutral_wins: 5,
136136
self_atari: 10,
137-
use_empty: false,
137+
use_empty: true,
138138
},
139139
reuse_subtree: true,
140140
tuned: true,

src/engine/uct/node/mod.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ impl Node {
154154
.iter()
155155
.map(|&m| Node::new(m, self.config))
156156
.collect();
157-
if self.children.len() <= (game.size() * game.size() / 10) as usize {
157+
let size = game.size() as usize;
158+
if self.children.len() <= (size * size / 10) {
158159
if !self.config.play_out_aftermath || game.winner() == game.next_player() {
159160
//don't pass if we're losing on the board on CGOS, but otherwise it's OK
160161
self.children.push(Node::new(Pass(game.next_player()), self.config));
161162
}
162163
}
163-
164+
164165
self.descendants = self.children.len();
165166
}
166167
}
@@ -172,31 +173,31 @@ impl Node {
172173
.iter()
173174
.map(|m| self.new_leaf(board, m))
174175
.collect();
175-
176+
176177
self.priors(&mut children, board);
177178
self.children = children;
178-
179-
if self.children.len() <= (board.size() * board.size() / 10) as usize {
179+
let size = board.size() as usize;
180+
if self.children.len() <= (size * size / 10) {
180181
let player = board.next_player();
181182
if !self.config.play_out_aftermath || board.winner() == player {
182183
//don't pass if we're losing on the board on CGOS, but otherwise it's OK
183184
self.children.push(Node::new(Pass(player), self.config));
184185
}
185-
186+
186187
}
187188
}
188189

189-
190+
190191
self.descendants = self.children.len();
191192
not_terminal
192193
}
193-
194+
194195
pub fn priors(&self, children: &mut Vec<Node>, board: &Board) {
195196
let color = board.next_player().opposite();
196197

197198
let in_danger = board.chains().iter()
198199
.filter(|chain| chain.color() == color && chain.coords().len() == 1 && chain.liberties().len() <= 2);
199-
200+
200201
for one_stone in in_danger {
201202
if let Some(solution) = board.capture_ladder(one_stone) {
202203
if let Some(node) = children.iter_mut().find(|c| c.m() == solution) {
@@ -205,10 +206,10 @@ impl Node {
205206
}
206207
}
207208
}
208-
209+
209210
let in_danger = board.chains().iter()
210211
.filter(|chain| chain.color() == color && chain.coords().len() > 1 && chain.liberties().len() <= 2);
211-
212+
212213
for many_stones in in_danger {
213214
if let Some(solution) = board.capture_ladder(many_stones) {
214215
if let Some(node) = children.iter_mut().find(|c| c.m() == solution) {
@@ -240,7 +241,7 @@ impl Node {
240241
}
241242
node
242243
}
243-
244+
244245
fn in_empty_area(&self, board: &Board, m: &Move) -> bool {
245246
m.coord().manhattan_distance_three_neighbours(board.size())
246247
.iter()

src/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
************************************************************************/
2121

2222
pub fn version() -> &'static str {
23-
"0.2.2-rc1"
23+
"0.2.2"
2424
}

0 commit comments

Comments
 (0)