repo.or.cz
/
pachi.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
UCT avg_score: Track avg score of last move search explicitly in the tree
[pachi.git]
/
tools
/
pattern3_show.pl
blob
525652c5bb4af4398481878ae63111d4e471b6c9
1
#!/usr/bin/perl
2
# ./pattern3_show.pl PATNUM
3
4
use
warnings
;
5
no
warnings
"qw"
;
6
use
strict
;
7
8
my
$pat
=
shift
@ARGV
;
9
my
@s
=
qw(. X O #)
;
10
11
my
@p
=
map
{ (
$pat
>> (
2
*
$_
)) &
3
} (
0
.
.7
);
12
splice
@p
,
4
,
0
, (
0
);
13
for
my
$y
(
0
.
.2
) {
14
for
my
$x
(
reverse
0
.
.2
) {
15
print
$s
[
$p
[
$x
+
$y
*
3
]];
16
}
17
print
"
\n
"
;
18
}