<commit_before>#!/usr/bin/env perl

use v5.18;

use File::Basename;
use File::Spec;
my $dirname;
BEGIN { $dirname = dirname(File::Spec->rel2abs( __FILE__ )) }
use lib "$dirname/local/lib/perl5";
use lib "$dirname/lib";

use JSON::MaybeXS;
use File::Slurp;
use LCG;
use Data::Dump;
use IPC::Open2;
use Getopt::Long;
use Storable qw( dclone );

my @old_worlds = ();

# Actual game stuff
use Board;
use Unit;
use World;

our $debug;
our $visualize;
our $seed_option;
our $contest_mode;
our @power_phrases;
our $time_travel_enabled;

Getopt::Long::Configure("bundling");
Getopt::Long::Configure("auto_help");
GetOptions(
  "debug|d"      => \$debug,
  "visualize|v"  => \$visualize,
  "seed|s=i"     => \$seed_option,
  "contest-mode" => \$contest_mode,
  "power|p=s"    => \@power_phrases,
  "timetravel|t" => \$time_travel_enabled,
);

=head1 SYNOPSIS

verify.pl [-d] [-v] [-s seed] [-p power] problem.json ./bot

  -d, --debug      Show some debugging output
  -v, --visualize  Draw the state
  -s, --seed S     Set the seed to S
  -p, --power X    Add a power phrase
  --contest-mode   Output in the contest format, all seeds
<commit_msg>Document time travel flag<commit_after>#!/usr/bin/env perl

use v5.18;

use File::Basename;
use File::Spec;
my $dirname;
BEGIN { $dirname = dirname(File::Spec->rel2abs( __FILE__ )) }
use lib "$dirname/local/lib/perl5";
use lib "$dirname/lib";

use JSON::MaybeXS;
use File::Slurp;
use LCG;
use Data::Dump;
use IPC::Open2;
use Getopt::Long;
use Storable qw( dclone );

my @old_worlds = ();

# Actual game stuff
use Board;
use Unit;
use World;

our $debug;
our $visualize;
our $seed_option;
our $contest_mode;
our @power_phrases;
our $time_travel_enabled;

Getopt::Long::Configure("bundling");
Getopt::Long::Configure("auto_help");
GetOptions(
  "debug|d"      => \$debug,
  "visualize|v"  => \$visualize,
  "seed|s=i"     => \$seed_option,
  "contest-mode" => \$contest_mode,
  "power|p=s"    => \@power_phrases,
  "timetravel|t" => \$time_travel_enabled,
);

=head1 SYNOPSIS

verify.pl [-d] [-v] [-s seed] [-p power] problem.json ./bot

  -d, --debug      Show some debugging output
  -v, --visualize  Draw the state
  -s, --seed S     Set the seed to S
  -p, --power X    Add a power phrase
  -t, --timetravel Enable time travel
  --contest-mode   Output in the contest format, all seeds

{'fraction_non_alphanumeric': 0.1650902837489252, 'fraction_numerical': 0.0060189165950128975, 'mean_word_length': 3.847916666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1391239', 'n_tokens_mistral': 932, 'n_tokens_neox': 895, 'n_words': 246}