1 # Default configuration. Copy this file to config.local.pm if you want
2 # to change anything instead of modifying this (so you won't have to make
5 package remoteglotconf;
7 our $server = "freechess.org"; # undef to not connect to FICS.
8 our $nick = "SesseBOT";
9 our $target = "GMCarlsen"; # FICS username or HTTP to a PGN file.
11 # Set to non-undef to pick out one specific game from a PGN file with many games.
13 our $pgn_filter = undef;
14 #our $pgn_filter = sub {
16 # return $pgn->round() eq '7' && $pgn->white eq 'Carlsen,M';
19 # Set to non-undef to override the clock information with our own calculations.
20 # The example implements a simple 60+60 (with bonus added before the move).
21 # FIXME(sesse): We might not see all moves in a PGN individually, so this might
22 # skip some moves for bonus.
23 our $adjust_clocks_before_move = undef;
24 #our $adjust_clocks_before_move = sub {
25 # my ($white_clock_left, $black_clock_left, $move, $toplay) = @_;
27 # if (!defined($$white_clock_left) || !defined($$black_clock_left)) {
28 # $$white_clock_left = 3600;
29 # $$black_clock_left = 3600;
31 # if ($toplay eq 'W') {
32 # $$white_clock_left += 60;
34 # $$black_clock_left += 60;
38 our $json_output = "/srv/analysis.sesse.net/www/analysis.json";
39 our $json_history_dir = "/srv/analysis.sesse.net/www/history/"; # undef for none.
41 our $engine_cmdline = "./stockfish";
42 our %engine_config = (
43 # 'NalimovPath' => '/srv/tablebase',
44 'NalimovUsage' => 'Rarely',
48 our $engine_grpc_backend = undef; # Not used by us, but will be communicated to serve-analysis.js.
50 # Separate engine for multi-PV; can be undef for none.
51 our $engine2_cmdline = undef;
52 our %engine2_config = (
53 # 'NalimovPath' => '/srv/tablebase',
54 'NalimovUsage' => 'Rarely',
58 our $engine2_grpc_backend = undef; # Not used by us, but will be communicated to serve-analysis.js.
60 our $update_max_interval = 1.0;
61 our $update_force_after_move = 0.2;
66 # Command line to run the Fathom tablebase lookup program, if installed,
67 # including the --path= argument.
68 our $fathom_cmdline = undef;
70 # ChessOK serial key (of the form NNNNN-NNNNN-NNNNN-NNNNN-NNNNN-NNNNN)
71 # for looking up 7-man tablebases; undef means no lookup. Note that
72 # you probably need specific prior permission to use this.
73 our $tb_serial_key = undef;
75 # Credits to show in the footer.
76 our $engine_url = "http://www.stockfishchess.org/";
77 our $engine_details = undef; # For hardware.
78 our $move_source = "FICS";
79 our $move_source_url = "http://www.freechess.org/";
81 # Postgres configuration.
82 our $dbistr = "dbi:Pg:dbname=remoteglot";
87 my $config_filename = $ENV{'REMOTEGLOT_CONFIG'} // 'config.local.pm';
88 require $config_filename;