]> git.sesse.net Git - remoteglot/blob - config.pm
Make castling O-O instead of 0-0, as per FEN standard.
[remoteglot] / config.pm
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
3 # changes in git).
4
5 package remoteglotconf;
6
7 our $server = "freechess.org";
8 our $nick = "SesseBOT";
9 our $target = "GMCarlsen";  # FICS username or HTTP to a PGN file.
10
11 # Set to non-undef to pick out one specific game from a PGN file with many games.
12 # See example.
13 our $pgn_filter = undef;
14 #our $pgn_filter = sub {
15 #       my $pgn = shift;
16 #       return $pgn->round() eq '7' && $pgn->white eq 'Carlsen,M';
17 #};
18
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) = @_;
26 #
27 #        if (!defined($$white_clock_left) || !defined($$black_clock_left)) {
28 #                $$white_clock_left = 3600;
29 #                $$black_clock_left = 3600;
30 #        }
31 #        if ($toplay eq 'W') {
32 #                $$white_clock_left += 60;
33 #        } else {
34 #                $$black_clock_left += 60;
35 #        }
36 #};
37
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.
40
41 our $engine_cmdline = "./stockfish";
42 our %engine_config = (
43 #       'NalimovPath' => '/srv/tablebase',
44         'NalimovUsage' => 'Rarely',
45         'Hash' => '1024',
46 #       'MultiPV' => '2'
47 );
48
49 # Separate engine for multi-PV; can be undef for none.
50 our $engine2_cmdline = undef;
51 our %engine2_config = (
52 #       'NalimovPath' => '/srv/tablebase',
53         'NalimovUsage' => 'Rarely',
54         'Hash' => '1024',
55         'Threads' => '8',
56 );
57
58 our $uci_assume_full_compliance = 0;                    # dangerous :-)
59 our $update_max_interval = 1.0;
60 our @masters = (
61         'Sesse',
62 );
63
64 # ChessOK serial key (of the form NNNNN-NNNNN-NNNNN-NNNNN-NNNNN-NNNNN)
65 # for looking up 7-man tablebases; undef means no lookup. Note that
66 # you probably need specific prior permission to use this.
67 our $tb_serial_key = undef;
68
69 # Credits to show in the footer.
70 our $engine_url = "http://www.stockfishchess.org/";
71 our $engine_details = undef;  # For hardware.
72 our $move_source = "FICS";
73 our $move_source_url = "http://www.freechess.org/";
74
75 # Postgres configuration.
76 our $dbistr = "dbi:Pg:dbname=remoteglot";
77 our $dbiuser = undef;
78 our $dbipass = undef;
79
80 eval {
81         my $config_filename = $ENV{'REMOTEGLOT_CONFIG'} // 'config.local.pm';
82         require $config_filename;
83 };