What
Jump to *Stats.
Log
Copy/pasted from gamesbyemail.com's game log. The page does fetch malformated json to populate the log, but the objects are dense. The presented log seems easier to parse. The interesting bits to extract are "Attacks", "Defends", "XXX defeated", and "END OF TURN".
Extract
"Quick" perl code to extract
use strict;
use experimental 'switch';
open my $fh, "<", "txt/risk_log.txt" or die "no file";
my @players=qw/Andrew Josh Will Ben Jim/;
my $turn=0;
my @res=();
my $init = {};
my $adjust= 0;
my %player_contries=(); # track ownership
my @keys = qw/turn a.player d.player a.country a.n d.country d.n a.lost d.lost status/;
while($_=<$fh>){
# we could only set player when they change turns
# but easier to do each new line
my $playeridx = ($turn-$adjust)%($#players+1);
my $player = $players[$playeridx];
given ($_) {
when (/Deployed.*to ([A-Z].+) \(/) {
# initialze who owns what. misses anything never reinforced (abandoned first assingments)
#print STDERR "on $turn: $1 was ", $player_contries{$1}||"unknown", ", now $player\n";
$player_contries{$1}=$player;
} when (/([A-Z].+) \((\d+)\) attacks ([A-Z].+) \((\d+)\) /) {
# starts like "XXX (nx) attacks YYYY (ny) "
# rolls include losses
# dont update if switch from "until defeted" to "with x"
if(! %$init || # no init
$init->{"turn"} != $turn || # different round
$init->{"a.country"} != $1 || # different attack
$init->{"d.country"} != $3 # different defend
){
if(%$init){
print STDERR "gave up and attacked someone new!? @{$init}{@keys} -> $_";
push @res, $init;
}
my $adv = $player_contries{$init->{"d.country"}}||"NA";
$init = {"turn"=>$turn,
"a.player"=>$player, "d.player"=>$adv,
"a.country"=>$1, "a.n"=> $2,
"d.country"=>$3, "d.n" => $4,
"a.lost" => 0, "d.lost" => 0,
"status"=>"kept"};
print STDERR "ERROR: already $init->{'d.country'}=> $player ($adv): @{$init}{@keys}\n" if $adv == $player;
} else {
print STDERR "until def to 1/2 attackes @{$init}{@keys} -> $_"
}
} when (/^Attacker lost (\d+)/) {
$init->{"a.lost"}+=$1;
} when (/^Defender lost (\d+)/) {
$init->{"d.lost"}+=$1;
} when (/captured/){
# event ends with a capture.
# if kept we dont get a new message. but log starts new event
# if captured, update to say so (otherwise keep "kept" status)
$init->{status} = $&;
$player_contries{$init->{"d.country"}} = $player;
print STDERR "changed owernship $init->{'d.country'} => $player_contries{$init->{'d.country'}}: @{$init}{@keys}\n";
push @res, $init if %$init;
$init = {};
} when(/^(\S+) defeated/) {
# compensate for defeated person
my $defeated=$1;
@players = grep {!/$defeated/x} @players;
# how many rounds have played -- remove that from the total turn count
# so we can pretend the defeated never existed
$adjust = $turn-$playeridx+1;
} when(/END OF TURN/) {
# finally turns are finished
push @res, $init if %$init;
print STDERR "no ownership change: @{$init}{@keys}\n";
$init = {};
$turn++;
}
}
}
# add header
my %keys = (); $keys{$_}=$_ for (@keys);
unshift @res, \%keys;
# make it into a table
join "\n", map {join("\t", @{$_}{@keys})} @res;
turn | a.player | d.player | a.country | a.n | d.country | d.n | a.lost | d.lost | status |
6 | Josh | NA | Venezuela | 5 | Central America | 1 | 0 | 1 | captured |
6 | Josh | NA | Eastern United States | 9 | Quebec | 3 | 0 | 3 | captured |
6 | Josh | NA | Eastern United States | 6 | Western United States | 3 | 3 | 3 | captured |
7 | Will | NA | Eastern Australia | 11 | New Guinea | 1 | 1 | 1 | captured |
7 | Will | NA | New Guinea | 3 | Indonesia | 1 | 2 | 0 | kept |
8 | Ben | NA | Irkutsk | 4 | Kamchatka | 1 | 3 | 0 | kept |
9 | Jim | NA | Argentina | 21 | Peru | 1 | 1 | 1 | captured |
9 | Jim | NA | Peru | 19 | Venezuela | 2 | 1 | 2 | captured |
9 | Jim | NA | Venezuela | 17 | Brazil | 2 | 2 | 2 | captured |
10 | Andrew | NA | Egypt | 11 | East Africa | 1 | 0 | 1 | captured |
10 | Andrew | NA | East Africa | 3 | Congo | 1 | 1 | 1 | captured |
11 | Josh | NA | Ontario | 5 | Alberta | 4 | 4 | 0 | kept |
12 | Will | NA | Eastern Australia | 5 | Western Australia | 1 | 4 | 1 | captured |
12 | Will | NA | New Guinea | 2 | Western Australia | 1 | 1 | 1 | captured |
13 | Ben | NA | Irkutsk | 4 | Kamchatka | 1 | 0 | 1 | captured |
13 | Ben | NA | Alberta | 4 | Ontario | 1 | 0 | 1 | captured |
14 | Jim | NA | Venezuela | 13 | Central America | 8 | 6 | 8 | captured |
14 | Jim | NA | Brazil | 7 | North Africa | 1 | 2 | 1 | captured |
15 | Andrew | NA | Egypt | 12 | North Africa | 1 | 0 | 1 | captured |
15 | Andrew | NA | Egypt | 9 | Middle East | 1 | 0 | 1 | captured |
16 | Josh | NA | Quebec | 8 | Ontario | 2 | 1 | 2 | captured |
16 | Josh | NA | Ontario | 3 | Alberta | 2 | 5 | 4 | kept |
17 | Will | NA | Indonesia | 5 | Western Australia | 1 | 0 | 1 | captured |
18 | Ben | NA | Alberta | 5 | Ontario | 1 | 0 | 1 | captured |
18 | Ben | NA | Ontario | 3 | Quebec | 1 | 0 | 1 | captured |
19 | Jim | NA | Central America | 6 | Western United States | 1 | 0 | 1 | captured |
19 | Jim | NA | Western United States | 3 | Eastern United States | 1 | 2 | 1 | captured |
20 | Andrew | NA | Egypt | 8 | Southern Europe | 3 | 4 | 3 | captured |
20 | Andrew | NA | Japan | 3 | Mongolia | 1 | 0 | 1 | captured |
21 | Josh | NA | India | 4 | China | 1 | 0 | 1 | captured |
21 | Josh | NA | China | 3 | Afghanistan | 1 | 2 | 0 | kept |
22 | Will | NA | Afghanistan | 5 | India | 1 | 0 | 1 | captured |
22 | Will | NA | India | 4 | China | 1 | 0 | 1 | captured |
22 | Will | NA | China | 3 | Ural | 1 | 2 | 1 | captured |
23 | Ben | NA | Alberta | 5 | Northwest Territory | 1 | 0 | 1 | captured |
24 | Jim | NA | Brazil | 16 | North Africa | 8 | 10 | 8 | captured |
25 | Andrew | NA | Congo | 15 | North Africa | 1 | 0 | 1 | captured |
25 | Andrew | NA | North Africa | 14 | Brazil | 5 | 5 | 5 | captured |
26 | Will | NA | Western Europe | 5 | Southern Europe | 1 | 0 | 1 | captured |
26 | Will | NA | Great Britain | 6 | Scandinavia | 1 | 1 | 1 | captured |
27 | Ben | NA | Northwest Territory | 7 | Alaska | 3 | 4 | 3 | captured |
27 | Ben | NA | Alberta | 9 | Western United States | 1 | 0 | 1 | captured |
28 | Jim | NA | Venezuela | 10 | Brazil | 1 | 0 | 1 | captured |
28 | Jim | NA | Brazil | 9 | North Africa | 8 | 6 | 2 | kept |
30 | Will | NA | Great Britain | 16 | Iceland | 11 | 15 | 12 | captured |
31 | Ben | NA | Iceland | 4 | Scandinavia | 1 | 0 | 1 | captured |
31 | Ben | NA | Western United States | 8 | Central America | 2 | 0 | 2 | captured |
31 | Ben | NA | Western United States | 5 | Eastern United States | 1 | 0 | 1 | captured |
32 | Jim | NA | Brazil | 8 | North Africa | 9 | 1 | 9 | captured |
33 | Andrew | NA | Mongolia | 5 | Irkutsk | 1 | 1 | 1 | captured |
33 | Andrew | NA | Irkutsk | 3 | Siberia | 1 | 0 | 1 | captured |
33 | Andrew | NA | Siberia | 2 | Ural | 1 | 1 | 0 | kept |
34 | Will | NA | Great Britain | 8 | Iceland | 3 | 0 | 3 | captured |
34 | Will | NA | Ukraine | 3 | Scandinavia | 1 | 0 | 1 | captured |
34 | Will | NA | Iceland | 3 | Greenland | 1 | 0 | 1 | captured |
35 | Ben | NA | Quebec | 5 | Greenland | 1 | 1 | 1 | captured |
36 | Jim | NA | North Africa | 8 | Western Europe | 2 | 0 | 2 | captured |
37 | Andrew | NA | Siberia | 4 | Yakutsk | 1 | 0 | 1 | captured |
38 | Will | NA | Iceland | 6 | Greenland | 4 | 3 | 4 | captured |
38 | Will | NA | Iceland | 3 | Greenland | 3 | 2 | 0 | kept |
40 | Jim | NA | North Africa | 17 | Egypt | 1 | 0 | 1 | captured |
40 | Jim | NA | North Africa | 14 | Western Europe | 3 | 1 | 3 | captured |
40 | Jim | NA | North Africa | 10 | Congo | 1 | 1 | 1 | captured |
40 | Jim | NA | North Africa | 8 | Congo | 1 | 3 | 0 | kept |
41 | Andrew | NA | Siberia | 16 | Ural | 1 | 0 | 1 | captured |
41 | Andrew | NA | Ural | 3 | Afghanistan | 1 | 0 | 1 | captured |
41 | Andrew | NA | Afghanistan | 2 | Ukraine | 1 | 1 | 0 | kept |
42 | Will | NA | Iceland | 12 | Greenland | 11 | 12 | 8 | captured |
43 | Ben | NA | Greenland | 14 | Iceland | 4 | 9 | 4 | captured |
44 | Jim | NA | North Africa | 12 | Western Europe | 2 | 4 | 2 | captured |
44 | Jim | NA | North Africa | 5 | Congo | 1 | 0 | 1 | captured |
45 | Andrew | NA | Ural | 4 | Ukraine | 1 | 0 | 1 | captured |
45 | Andrew | NA | Ukraine | 3 | Scandinavia | 1 | 2 | 0 | kept |
46 | Will | NA | Great Britain | 7 | Iceland | 1 | 0 | 1 | captured |
46 | Will | NA | Iceland | 6 | Greenland | 4 | 1 | 4 | captured |
47 | Ben | NA | Northwest Territory | 5 | Greenland | 1 | 0 | 1 | captured |
48 | Jim | NA | Western Europe | 6 | Southern Europe | 1 | 0 | 1 | captured |
48 | Jim | NA | Southern Europe | 3 | Middle East | 1 | 2 | 0 | kept |
49 | Andrew | NA | Middle East | 4 | Southern Europe | 1 | 0 | 1 | captured |
50 | Will | NA | Iceland | 8 | Greenland | 4 | 10 | 4 | captured |
51 | Ben | NA | Greenland | 10 | Iceland | 1 | 2 | 1 | captured |
52 | Jim | NA | Venezuela | 24 | Central America | 6 | 5 | 6 | captured |
52 | Jim | NA | Central America | 18 | Eastern United States | 3 | 3 | 3 | captured |
52 | Jim | NA | Eastern United States | 3 | Western United States | 2 | 0 | 2 | captured |
52 | Jim | NA | North Africa | 6 | Southern Europe | 2 | 2 | 0 | kept |
53 | Andrew | NA | Southern Europe | 3 | Egypt | 1 | 0 | 1 | captured |
53 | Andrew | NA | Ural | 13 | Afghanistan | 1 | 1 | 1 | captured |
53 | Andrew | NA | Afghanistan | 3 | China | 1 | 2 | 1 | captured |
54 | Will | NA | Great Britain | 9 | Western Europe | 1 | 0 | 1 | captured |
54 | Will | NA | Great Britain | 6 | Iceland | 1 | 0 | 1 | captured |
55 | Ben | NA | Quebec | 5 | Eastern United States | 1 | 0 | 1 | captured |
56 | Jim | NA | North Africa | 9 | Egypt | 1 | 0 | 1 | captured |
56 | Jim | NA | North Africa | 8 | Western Europe | 3 | 2 | 3 | captured |
56 | Jim | NA | Western United States | 2 | Eastern United States | 4 | 1 | 0 | kept |
57 | Andrew | NA | South Africa | 15 | Congo | 1 | 0 | 1 | captured |
57 | Andrew | NA | South Africa | 12 | East Africa | 1 | 0 | 1 | captured |
57 | Andrew | NA | East Africa | 3 | Egypt | 1 | 0 | 1 | captured |
57 | Andrew | NA | Congo | 3 | North Africa | 3 | 0 | 3 | captured |
57 | Andrew | NA | South Africa | 9 | Madagascar | 6 | 1 | 6 | captured |
58 | Will | NA | Northern Europe | 7 | Southern Europe | 1 | 2 | 1 | captured |
58 | Will | NA | Southern Europe | 4 | Egypt | 2 | 1 | 2 | captured |
58 | Will | NA | Scandinavia | 3 | Ukraine | 1 | 1 | 1 | captured |
59 | Ben | NA | Alberta | 17 | Western United States | 1 | 0 | 1 | captured |
59 | Ben | NA | Western United States | 16 | Central America | 1 | 0 | 1 | captured |
60 | Jim | NA | Western Europe | 18 | North Africa | 2 | 2 | 2 | captured |
60 | Jim | NA | North Africa | 13 | Egypt | 2 | 2 | 0 | kept |
61 | Andrew | NA | East Africa | 10 | North Africa | 3 | 5 | 3 | captured |
62 | Will | NA | Iceland | 9 | Greenland | 7 | 8 | 6 | captured |
63 | Ben | NA | Kamchatka | 5 | Yakutsk | 1 | 0 | 1 | captured |
64 | Jim | NA | Venezuela | 17 | Central America | 18 | 5 | 7 | captured |
65 | Andrew | NA | Irkutsk | 5 | Yakutsk | 1 | 0 | 1 | captured |
65 | Andrew | NA | Ural | 9 | Afghanistan | 1 | 1 | 1 | captured |
66 | Will | NA | Iceland | 18 | Greenland | 6 | 8 | 6 | captured |
67 | Ben | NA | Ontario | 15 | Greenland | 3 | 2 | 3 | captured |
67 | Ben | NA | Greenland | 12 | Iceland | 5 | 9 | 5 | captured |
68 | Jim | NA | Western Europe | 5 | Southern Europe | 1 | 1 | 1 | captured |
68 | Jim | NA | Venezuela | 19 | Central America | 15 | 7 | 3 | kept |
69 | Andrew | NA | Yakutsk | 11 | Kamchatka | 4 | 2 | 4 | captured |
69 | Andrew | NA | Kamchatka | 8 | Alaska | 4 | 1 | 4 | captured |
69 | Andrew | NA | Alaska | 6 | Northwest Territory | 1 | 0 | 1 | captured |
69 | Andrew | NA | Northwest Territory | 5 | Alberta | 1 | 1 | 1 | captured |
69 | Andrew | NA | Ural | 9 | China | 1 | 1 | 1 | captured |
70 | Will | NA | Egypt | 7 | East Africa | 1 | 0 | 1 | captured |
71 | Ben | NA | Ontario | 4 | Northwest Territory | 1 | 2 | 1 | captured |
71 | Ben | NA | Ontario | 2 | Northwest Territory | 1 | 1 | 0 | kept |
72 | Jim | NA | Southern Europe | 18 | Ukraine | 4 | 5 | 4 | captured |
72 | Jim | NA | Southern Europe | 12 | Middle East | 2 | 0 | 2 | captured |
72 | Jim | NA | Middle East | 3 | Egypt | 4 | 3 | 4 | captured |
73 | Andrew | NA | Afghanistan | 6 | Middle East | 1 | 4 | 1 | captured |
73 | Andrew | NA | China | 11 | India | 1 | 1 | 1 | captured |
73 | Andrew | NA | Alberta | 3 | Ontario | 1 | 0 | 1 | captured |
73 | Andrew | NA | Ontario | 2 | Quebec | 1 | 0 | 1 | captured |
74 | Will | NA | East Africa | 9 | Middle East | 1 | 1 | 1 | captured |
74 | Will | NA | Middle East | 5 | India | 9 | 3 | 7 | captured |
75 | Ben | NA | Eastern United States | 4 | Quebec | 1 | 0 | 1 | captured |
76 | Jim | NA | Venezuela | 14 | Central America | 12 | 4 | 6 | captured |
76 | Jim | NA | East Africa | 3 | Congo | 1 | 0 | 1 | captured |
76 | Jim | NA | Congo | 2 | South Africa | 1 | 1 | 0 | kept |
77 | Andrew | NA | India | 8 | Afghanistan | 1 | 0 | 1 | captured |
78 | Will | NA | Middle East | 5 | Southern Europe | 1 | 1 | 1 | captured |
79 | Ben | NA | Quebec | 6 | Ontario | 1 | 0 | 1 | captured |
80 | Jim | NA | Congo | 6 | South Africa | 1 | 0 | 1 | captured |
80 | Jim | NA | South Africa | 5 | Madagascar | 1 | 1 | 1 | captured |
80 | Jim | NA | Venezuela | 14 | Central America | 9 | 2 | 2 | kept |
81 | Andrew | NA | Afghanistan | 15 | Middle East | 1 | 0 | 1 | captured |
81 | Andrew | NA | Middle East | 14 | Egypt | 1 | 0 | 1 | captured |
81 | Andrew | NA | Egypt | 13 | North Africa | 6 | 0 | 6 | captured |
81 | Andrew | NA | North Africa | 12 | Congo | 1 | 1 | 1 | captured |
81 | Andrew | NA | Congo | 10 | East Africa | 1 | 0 | 1 | captured |
81 | Andrew | NA | East Africa | 9 | Madagascar | 3 | 3 | 3 | captured |
81 | Andrew | NA | Madagascar | 5 | South Africa | 1 | 2 | 1 | captured |
82 | Will | NA | Southern Europe | 7 | Middle East | 1 | 1 | 1 | captured |
82 | Will | NA | Middle East | 3 | Egypt | 1 | 1 | 1 | captured |
83 | Ben | NA | Ontario | 6 | Alberta | 1 | 0 | 1 | captured |
83 | Ben | NA | Alberta | 5 | Northwest Territory | 1 | 0 | 1 | captured |
83 | Ben | NA | Northwest Territory | 4 | Alaska | 1 | 0 | 1 | captured |
84 | Jim | NA | Venezuela | 14 | Central America | 8 | 3 | 1 | captured |
84 | Jim | NA | North Africa | 7 | Egypt | 1 | 0 | 1 | captured |
84 | Jim | NA | Egypt | 3 | East Africa | 1 | 2 | 1 | captured |
85 | Andrew | NA | India | 13 | Middle East | 2 | 0 | 2 | captured |
86 | Will | NA | Great Britain | 7 | Iceland | 1 | 1 | 1 | captured |
86 | Will | NA | Iceland | 5 | Greenland | 2 | 0 | 2 | captured |
87 | Ben | NA | Quebec | 12 | Greenland | 2 | 0 | 2 | captured |
88 | Jim | NA | Ukraine | 4 | Ural | 1 | 0 | 1 | captured |
88 | Jim | NA | Venezuela | 14 | Central America | 8 | 2 | 2 | kept |
89 | Andrew | NA | Middle East | 23 | Southern Europe | 2 | 1 | 2 | captured |
89 | Andrew | NA | Southern Europe | 21 | Northern Europe | 3 | 3 | 3 | captured |
89 | Andrew | NA | Northern Europe | 3 | Ukraine | 1 | 4 | 1 | captured |
90 | Will | NA | Great Britain | 11 | Scandinavia | 1 | 0 | 1 | captured |
91 | Ben | NA | Central America | 15 | Venezuela | 12 | 3 | 3 | kept |
92 | Jim | NA | Venezuela | 14 | Central America | 12 | 9 | 12 | captured |
93 | Andrew | NA | Afghanistan | 3 | Ukraine | 1 | 0 | 1 | captured |
94 | Will | NA | Scandinavia | 21 | Ukraine | 2 | 3 | 2 | captured |
94 | Will | NA | Scandinavia | 15 | Northern Europe | 1 | 1 | 1 | captured |
95 | Ben | NA | Alaska | 9 | Kamchatka | 1 | 0 | 1 | captured |
95 | Ben | NA | Greenland | 10 | Iceland | 3 | 2 | 3 | captured |
96 | Jim | NA | Egypt | 18 | East Africa | 1 | 1 | 1 | captured |
96 | Jim | NA | East Africa | 16 | South Africa | 1 | 0 | 1 | captured |
96 | Jim | NA | East Africa | 15 | Madagascar | 2 | 0 | 2 | captured |
96 | Jim | NA | East Africa | 13 | Middle East | 1 | 0 | 1 | captured |
97 | Andrew | NA | Southern Europe | 16 | Ukraine | 3 | 2 | 3 | captured |
98 | Will | NA | Northern Europe | 8 | Southern Europe | 1 | 0 | 1 | captured |
99 | Ben | NA | Eastern United States | 7 | Central America | 3 | 5 | 3 | captured |
100 | Jim | NA | North Africa | 21 | Western Europe | 2 | 1 | 2 | captured |
100 | Jim | NA | Western Europe | 14 | Great Britain | 10 | 10 | 10 | captured |
101 | Andrew | NA | Ukraine | 20 | Northern Europe | 4 | 1 | 4 | captured |
101 | Andrew | NA | Northern Europe | 18 | Scandinavia | 3 | 4 | 3 | captured |
102 | Will | NA | Southern Europe | 9 | Egypt | 1 | 0 | 1 | captured |
102 | Will | NA | Egypt | 8 | East Africa | 1 | 0 | 1 | captured |
103 | Ben | NA | Central America | 9 | Venezuela | 6 | 6 | 2 | captured |
104 | Jim | NA | Western Europe | 3 | Great Britain | 1 | 1 | 1 | captured |
104 | Jim | NA | North Africa | 11 | Egypt | 4 | 6 | 4 | kept |
105 | Andrew | NA | Scandinavia | 13 | Iceland | 1 | 0 | 1 | captured |
105 | Andrew | NA | Iceland | 12 | Greenland | 5 | 11 | 4 | kept |
106 | Will | NA | East Africa | 19 | Madagascar | 2 | 1 | 2 | captured |
106 | Will | NA | Madagascar | 14 | South Africa | 1 | 1 | 1 | captured |
107 | Ben | NA | Kamchatka | 3 | Yakutsk | 1 | 0 | 1 | captured |
108 | Jim | NA | Middle East | 3 | Southern Europe | 1 | 0 | 1 | captured |
108 | Jim | NA | Southern Europe | 2 | Egypt | 2 | 9 | 2 | captured |
108 | Jim | NA | Egypt | 3 | East Africa | 4 | 2 | 1 | kept |
109 | Andrew | NA | Mongolia | 10 | Kamchatka | 1 | 0 | 1 | captured |
110 | Will | NA | South Africa | 16 | Congo | 1 | 0 | 1 | captured |
111 | Ben | NA | Yakutsk | 2 | Siberia | 1 | 1 | 1 | captured |
112 | Jim | NA | Ural | 4 | Ukraine | 1 | 1 | 1 | captured |
112 | Jim | NA | Venezuela | 12 | Central America | 12 | 4 | 4 | kept |
113 | Andrew | NA | Scandinavia | 13 | Ukraine | 1 | 1 | 1 | captured |
114 | Will | NA | East Africa | 17 | Egypt | 1 | 3 | 1 | captured |
114 | Will | NA | Egypt | 11 | North Africa | 1 | 0 | 1 | captured |
115 | Ben | NA | Iceland | 3 | Great Britain | 1 | 0 | 1 | captured |
115 | Ben | NA | Great Britain | 2 | Western Europe | 1 | 0 | 1 | captured |
116 | Jim | NA | Brazil | 16 | North Africa | 7 | 1 | 7 | captured |
117 | Andrew | NA | Ukraine | 11 | Ural | 2 | 6 | 2 | captured |
118 | Will | NA | Egypt | 7 | Middle East | 1 | 0 | 1 | captured |
119 | Ben | NA | Iceland | 6 | Scandinavia | 1 | 2 | 1 | captured |
119 | Ben | NA | Great Britain | 4 | Northern Europe | 1 | 3 | 1 | captured |
119 | Ben | NA | Scandinavia | 3 | Northern Europe | 1 | 2 | 0 | kept |
120 | Jim | NA | Venezuela | 21 | Central America | 15 | 9 | 15 | captured |
120 | Jim | NA | Central America | 11 | Eastern United States | 1 | 3 | 0 | kept |
121 | Andrew | NA | India | 4 | Middle East | 1 | 0 | 1 | captured |
121 | Andrew | NA | China | 3 | Siam | 26 | 2 | 0 | kept |
122 | Will | NA | Egypt | 9 | Southern Europe | 1 | 1 | 1 | captured |
123 | Ben | NA | Eastern United States | 5 | Central America | 1 | 6 | 1 | captured |
124 | Jim | NA | Central America | 6 | Eastern United States | 1 | 0 | 1 | captured |
124 | Jim | NA | Central America | 5 | Western United States | 1 | 0 | 1 | captured |
125 | Andrew | NA | Middle East | 3 | Southern Europe | 1 | 0 | 1 | captured |
126 | Will | NA | Congo | 17 | North Africa | 1 | 0 | 1 | captured |
126 | Will | NA | North Africa | 15 | Western Europe | 1 | 0 | 1 | captured |
127 | Ben | NA | Alberta | 14 | Western United States | 1 | 0 | 1 | captured |
127 | Ben | NA | Western United States | 13 | Eastern United States | 1 | 0 | 1 | captured |
127 | Ben | NA | Eastern United States | 12 | Central America | 4 | 4 | 4 | captured |
128 | Jim | NA | Venezuela | 13 | Central America | 7 | 5 | 7 | captured |
128 | Jim | NA | Central America | 3 | Eastern United States | 1 | 2 | 0 | kept |
129 | Andrew | NA | Northern Europe | 4 | Great Britain | 1 | 5 | 3 | captured |
130 | Will | NA | Western Europe | 5 | Great Britain | 1 | 1 | 1 | captured |
131 | Ben | NA | Eastern United States | 14 | Central America | 1 | 0 | 1 | captured |
131 | Ben | NA | Central America | 13 | Venezuela | 5 | 2 | 5 | captured |
131 | Ben | NA | Venezuela | 4 | Peru | 1 | 0 | 1 | captured |
131 | Ben | NA | Peru | 3 | Argentina | 1 | 2 | 0 | kept |
132 | Jim | NA | Brazil | 17 | Peru | 1 | 0 | 1 | captured |
132 | Jim | NA | Brazil | 16 | Venezuela | 1 | 3 | 1 | captured |
132 | Jim | NA | Brazil | 12 | North Africa | 17 | 7 | 17 | captured |
133 | Andrew | NA | Siberia | 4 | Yakutsk | 1 | 1 | 1 | captured |
134 | Will | NA | Congo | 7 | North Africa | 1 | 0 | 1 | captured |
135 | Ben | NA | Central America | 15 | Venezuela | 1 | 1 | 1 | captured |
135 | Ben | NA | Venezuela | 13 | Peru | 1 | 0 | 1 | captured |
135 | Ben | NA | Peru | 12 | Argentina | 1 | 1 | 1 | captured |
135 | Ben | NA | Argentina | 10 | Brazil | 4 | 1 | 4 | captured |
136 | Ben | NA | Southern Europe | 4 | Western Europe | 1 | 4 | 0 | kept |
137 | Andrew | NA | North Africa | 18 | Brazil | 10 | 4 | 10 | captured |
137 | Andrew | NA | Brazil | 12 | Argentina | 1 | 0 | 1 | captured |
137 | Andrew | NA | Argentina | 11 | Peru | 1 | 0 | 1 | captured |
137 | Andrew | NA | Peru | 10 | Venezuela | 1 | 0 | 1 | captured |
137 | Andrew | NA | Venezuela | 9 | Central America | 1 | 4 | 1 | captured |
138 | Will | NA | Eastern United States | 18 | Central America | 3 | 3 | 3 | captured |
138 | Will | NA | Central America | 14 | Venezuela | 2 | 2 | 2 | captured |
138 | Will | NA | Venezuela | 11 | Peru | 1 | 0 | 1 | captured |
138 | Will | NA | Peru | 10 | Argentina | 1 | 0 | 1 | captured |
138 | Will | NA | Argentina | 9 | Brazil | 1 | 0 | 1 | captured |
138 | Will | NA | Iceland | 10 | Great Britain | 5 | 5 | 5 | captured |
138 | Will | NA | Great Britain | 4 | Western Europe | 1 | 0 | 1 | captured |
138 | Will | NA | Brazil | 8 | North Africa | 3 | 4 | 3 | captured |
139 | Ben | NA | Ukraine | 6 | Scandinavia | 1 | 1 | 1 | captured |
140 | Andrew | NA | Egypt | 11 | North Africa | 1 | 1 | 1 | captured |
140 | Andrew | NA | North Africa | 9 | Brazil | 5 | 6 | 0 | kept |
141 | Will | NA | Alaska | 11 | Kamchatka | 1 | 0 | 1 | captured |
142 | Ben | NA | Scandinavia | 7 | Iceland | 2 | 0 | 2 | captured |
142 | Ben | NA | Iceland | 6 | Great Britain | 2 | 3 | 2 | captured |
143 | Andrew | NA | North Africa | 17 | Brazil | 10 | 10 | 10 | captured |
143 | Andrew | NA | Brazil | 6 | Venezuela | 1 | 0 | 1 | captured |
143 | Andrew | NA | Venezuela | 3 | Central America | 1 | 2 | 0 | kept |
144 | Will | NA | Central America | 10 | Venezuela | 2 | 1 | 2 | captured |
144 | Will | NA | Venezuela | 8 | Brazil | 2 | 1 | 2 | captured |
144 | Will | NA | Western Europe | 2 | North Africa | 1 | 0 | 1 | captured |
145 | Ben | NA | Great Britain | 4 | Western Europe | 1 | 4 | 3 | captured |
146 | Andrew | NA | East Africa | 12 | North Africa | 1 | 0 | 1 | captured |
146 | Andrew | NA | North Africa | 11 | Brazil | 6 | 1 | 6 | captured |
146 | Andrew | NA | Brazil | 9 | Venezuela | 1 | 0 | 1 | captured |
146 | Andrew | NA | Venezuela | 8 | Central America | 1 | 0 | 1 | captured |
147 | Will | NA | Greenland | 8 | Iceland | 1 | 2 | 1 | captured |
147 | Will | NA | Eastern United States | 4 | Central America | 4 | 3 | 1 | kept |
148 | Ben | NA | Middle East | 4 | East Africa | 1 | 0 | 1 | captured |
148 | Ben | NA | East Africa | 3 | North Africa | 1 | 0 | 1 | captured |
148 | Ben | NA | North Africa | 2 | Congo | 1 | 1 | 0 | kept |
149 | Andrew | NA | Brazil | 7 | Argentina | 1 | 1 | 1 | captured |
149 | Andrew | NA | Argentina | 3 | Peru | 1 | 0 | 1 | captured |
150 | Will | NA | Eastern United States | 14 | Central America | 5 | 4 | 5 | captured |
151 | Ben | NA | North Africa | 7 | Congo | 1 | 0 | 1 | captured |
151 | Ben | NA | Congo | 6 | South Africa | 2 | 3 | 2 | captured |
151 | Ben | NA | South Africa | 2 | Madagascar | 1 | 1 | 0 | kept |
152 | Andrew | NA | Egypt | 4 | North Africa | 1 | 1 | 1 | captured |
153 | Will | NA | Western Europe | 9 | North Africa | 2 | 1 | 2 | captured |
153 | Will | NA | North Africa | 7 | Brazil | 2 | 1 | 2 | captured |
153 | Will | NA | Brazil | 5 | Argentina | 1 | 0 | 1 | captured |
153 | Will | NA | Argentina | 4 | Peru | 2 | 0 | 2 | captured |
154 | Ben | NA | East Africa | 5 | Egypt | 1 | 0 | 1 | captured |
154 | Ben | NA | Egypt | 3 | North Africa | 1 | 1 | 1 | captured |
154 | Ben | NA | East Africa | 2 | Madagascar | 1 | 1 | 0 | kept |
155 | Andrew | NA | Venezuela | 21 | Peru | 3 | 1 | 3 | captured |
155 | Andrew | NA | Peru | 19 | Argentina | 1 | 0 | 1 | captured |
155 | Andrew | NA | Argentina | 18 | Brazil | 1 | 0 | 1 | captured |
156 | Will | NA | Central America | 17 | Venezuela | 14 | 8 | 14 | captured |
157 | Ben | NA | East Africa | 3 | Madagascar | 1 | 1 | 1 | captured |
157 | Ben | NA | Great Britain | 6 | Western Europe | 1 | 0 | 1 | captured |
158 | Andrew | NA | Siam | 48 | India | 3 | 2 | 3 | captured |
158 | Andrew | NA | India | 45 | Afghanistan | 1 | 3 | 1 | captured |
158 | Andrew | NA | Afghanistan | 41 | Ukraine | 1 | 0 | 1 | captured |
158 | Andrew | NA | Ukraine | 40 | Scandinavia | 3 | 12 | 3 | captured |
158 | Andrew | NA | Scandinavia | 27 | Iceland | 1 | 1 | 1 | captured |
158 | Andrew | NA | Iceland | 25 | Greenland | 5 | 1 | 5 | captured |
158 | Andrew | NA | Greenland | 23 | Northwest Territory | 1 | 1 | 1 | captured |
158 | Andrew | NA | Northwest Territory | 21 | Alaska | 8 | 2 | 8 | captured |
158 | Andrew | NA | Alaska | 18 | Alberta | 1 | 0 | 1 | captured |
158 | Andrew | NA | Alberta | 17 | Ontario | 1 | 0 | 1 | captured |
158 | Andrew | NA | Ontario | 16 | Quebec | 1 | 2 | 1 | captured |
158 | Andrew | NA | Quebec | 13 | Eastern United States | 1 | 0 | 1 | captured |
158 | Andrew | NA | Eastern United States | 12 | Western United States | 1 | 0 | 1 | captured |
158 | Andrew | NA | Western United States | 11 | Central America | 1 | 1 | 1 | captured |
158 | Andrew | NA | Brazil | 4 | Venezuela | 8 | 4 | 8 | captured |
159 | Andrew | NA | Middle East | 11 | India | 1 | 1 | 1 | captured |
159 | Andrew | NA | India | 9 | Siam | 1 | 0 | 1 | captured |
159 | Andrew | NA | Siam | 8 | Indonesia | 4 | 1 | 4 | captured |
159 | Andrew | NA | Indonesia | 6 | New Guinea | 1 | 1 | 1 | captured |
159 | Andrew | NA | New Guinea | 4 | Eastern Australia | 1 | 0 | 1 | captured |
159 | Andrew | NA | Eastern Australia | 3 | Western Australia | 1 | 0 | 1 | captured |
159 | Andrew | NA | China | 45 | Afghanistan | 1 | 3 | 1 | captured |
159 | Andrew | NA | Afghanistan | 41 | Ukraine | 1 | 0 | 1 | captured |
159 | Andrew | NA | Ukraine | 40 | Scandinavia | 1 | 3 | 1 | captured |
159 | Andrew | NA | Scandinavia | 36 | Iceland | 1 | 0 | 1 | captured |
159 | Andrew | NA | Iceland | 35 | Greenland | 1 | 0 | 1 | captured |
159 | Andrew | NA | Greenland | 34 | Northwest Territory | 1 | 1 | 1 | captured |
159 | Andrew | NA | Northwest Territory | 32 | Alaska | 1 | 0 | 1 | captured |
159 | Andrew | NA | Alaska | 31 | Alberta | 1 | 0 | 1 | captured |
159 | Andrew | NA | Alberta | 30 | Ontario | 1 | 0 | 1 | captured |
159 | Andrew | NA | Ontario | 29 | Quebec | 1 | 0 | 1 | captured |
159 | Andrew | NA | Quebec | 28 | Eastern United States | 1 | 0 | 1 | captured |
159 | Andrew | NA | Eastern United States | 27 | Western United States | 1 | 0 | 1 | captured |
159 | Andrew | NA | Western United States | 26 | Central America | 3 | 5 | 3 | captured |
159 | Andrew | NA | Central America | 20 | Venezuela | 1 | 1 | 1 | captured |
159 | Andrew | NA | Venezuela | 18 | Brazil | 5 | 2 | 5 | captured |
159 | Andrew | NA | Brazil | 15 | Peru | 1 | 0 | 1 | captured |
159 | Andrew | NA | Peru | 14 | Argentina | 1 | 0 | 1 | captured |
Stats
using attack information parsed from the logs. We can compute attacking stats.
N.B. The defending player is not currently tracked. Statitics are only for aggression.
library(dplyr)
top_attack <-
d %>%
group_by(a.player, d.player) %>% tally() %>%
group_by(a.player) %>% mutate(r=rank(n)) %>%
filter(r<2) %>% summarize(most.attacked=paste(d.player,collapse=","))
x <-
d %>%
group_by(a.player) %>%
summarise(attacks=n(),
losses=sum(a.lost),
kills=sum(d.lost),
win.ratio=length(which(status=='captured'))/n(),
avg.attack.disparity=mean(a.n - d.n)) %>%
mutate_at(.funs=function(x) round(x,2), vars(win.ratio, avg.attack.disparity)) %>%
#inner_join(top_attack) %>%
arrange(attacks)
a.player | attacks | losses | kills | win.ratio | avg.attack.disparity |
---|---|---|---|---|---|
Josh | 8 | 15 | 14 | 0.62 | 3.25 |
Ben | 69 | 94 | 96 | 0.87 | 5.23 |
Jim | 70 | 169 | 195 | 0.79 | 6.69 |
Will | 72 | 128 | 150 | 0.96 | 6.32 |
Andrew | 122 | 160 | 217 | 0.94 | 11.61 |
Colophon/Appendix
Perl::Critic
+flycheck
were helpful in debuging perl code.perldb: perl -d -e 0
was useful, but without tangling to a file, less than idea.- must explicity name
#+Name: results-codeblock
above generated#+RESULTS: codeblock
for next org-babel block to read in