line |
true |
false |
branch |
27
|
0 |
0 |
if $out |
37
|
0 |
0 |
unless $x_best_move |
45
|
0 |
0 |
if ($$Games::Alak::Tree{'endgame'}) |
50
|
0 |
0 |
unless @{$$Games::Alak::Tree{'successors'};} |
63
|
0 |
0 |
if (@o_move_chosen > 1) { } |
|
0 |
0 |
elsif (@o_move_chosen == 0) { } |
79
|
0 |
0 |
if ($$Games::Alak::Tree{'endgame'}) |
94
|
0 |
0 |
unless length $line |
99
|
0 |
0 |
if ($line =~ /^q/s) { } |
|
0 |
0 |
elsif ($line =~ /^(\d+)\s*to\s*(\d+)$/s) { } |
|
0 |
0 |
elsif ($line =~ /^g(?:row)?$/s) { } |
|
0 |
0 |
elsif ($line eq 'reset') { } |
|
0 |
0 |
elsif ($line =~ /^reset\s+([.ox]+)/s) { } |
|
0 |
0 |
elsif ($line =~ /^d(?:ump)?\s*(\d+)?$/s) { } |
|
0 |
0 |
elsif ($line eq 'advise' or $line eq 'advice') { } |
|
0 |
0 |
elsif ($line =~ /l(?:ookahead)?\s+([1-9]+)$/s) { } |
|
0 |
0 |
elsif ($line =~ /^h/s) { } |
112
|
0 |
0 |
if (length $board != 11) { } |
|
0 |
0 |
elsif (not $board =~ /\./s) { } |
|
0 |
0 |
elsif ($board =~ tr/x// < 2) { } |
|
0 |
0 |
elsif ($board =~ tr/o// < 2) { } |
127
|
0 |
0 |
defined $1 ? : |
183
|
0 |
0 |
unless $depth >= $Games::Alak::Max_depth or @{$$n{'successors'};} or $$n{'endgame'} |
186
|
0 |
0 |
if (@{$$n{'successors'};}) { } |
211
|
0 |
0 |
$mover eq 'x' ? : |
|
0 |
0 |
if (not @best_cases or $best_cases[0]{'average_payoff'} == $this_payoff) { } |
|
0 |
0 |
elsif ($mover eq 'x' ? $this_payoff > $best_cases[0]{'average_payoff'} : $this_payoff < $best_cases[0]{'average_payoff'}) { } |
225
|
0 |
0 |
if @best_cases == 1 |
226
|
0 |
0 |
if @best_cases |
253
|
0 |
0 |
if $depth > $max_depth_seen |
254
|
0 |
0 |
$$n{'whose_turn'} eq 'o' ? : |
|
0 |
0 |
$$n{'endgame'} ? : |
|
0 |
0 |
unless defined $show_to_depth and $show_to_depth <= $depth |
266
|
0 |
0 |
if (@{$$n{'successors'};}) |
279
|
0 |
0 |
unless $_[1] |
286
|
0 |
0 |
unless ref $_[0] eq 'HASH' |
288
|
0 |
0 |
if $$node{'endgame'} or $$node{'board'} =~ tr/x// < 2 or $$node{'board'} =~ tr/o// < 2 |
295
|
0 |
0 |
if ($mover eq 'x') { } |
|
0 |
0 |
elsif ($mover eq 'o') { } |
300
|
0 |
0 |
if @$successors |
305
|
0 |
0 |
unless substr($board, $i, 1) eq $mover |
313
|
0 |
0 |
if $to == -1 |
326
|
0 |
0 |
$mover eq 'o' ? : |
|
0 |
0 |
if $to > 1 and $mover eq 'o' ? substr($new_board, 0, $to) =~ s/o(x+)$/'o' . '.' x length($1);/es : substr($new_board, 0, $to) =~ s/x(o+)$/'x' . '.' x length($1);/es |
331
|
0 |
0 |
$mover eq 'o' ? : |
|
0 |
0 |
if $to < 9 and $mover eq 'o' ? substr($new_board, $to + 1) =~ s/^(x+)o/'.' x length($1) . 'o';/es : substr($new_board, $to + 1) =~ s/^(o+)x/'.' x length($1) . 'x';/es |
339
|
0 |
0 |
if (grep(($_ eq $other), split(//, $new_board, 0)) < 2) |
343
|
0 |
0 |
if $mover eq 'o' |
355
|
0 |
0 |
if $is_endgame |