Skip to content

Commit

Permalink
Update time control restrictions to be more explicit; add komi settings
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Apr 17, 2023
1 parent d86115f commit 40f1a8e
Show file tree
Hide file tree
Showing 4 changed files with 298 additions and 88 deletions.
80 changes: 65 additions & 15 deletions example_config.json5
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
/** Send the principal variation (PV) values. Note that your bot must output this
* data in a way that can be parsed.
*
* See `pv_format` for more details on formatting and parsing PV values .
*
* @default true
*/
// send_pv_data: true,
Expand Down Expand Up @@ -192,21 +190,43 @@
/** Allowed live game times for bot. */
/*
allowed_live_settings: {
per_move_time_range: [10, 300],
main_time_range: [0, 3600],
periods_range: [1, 10],
simple: {
per_move_time_range: [10, 300],
},
byoyomi: {
main_time_range: [0, 3600],
period_time_range: [10, 300],
periods_range: [1, 10],
},
fischer: {
max_time_range: [30, 600],
time_increment_range: [10, 300],
},
concurrent_games: 3,
},
*/

/** Allowed correspondence game times for bot.
*
* @default {"per_move_time_range": [43200, 259200], "main_time_range": [0, 86400], "periods_range": [1, 10]}
*/
/** Allowed correspondence game times for bot. */
/*
allowed_correspondence_settings: {
per_move_time_range: [43200, 259200],
main_time_range: [0, 86400],
periods_range: [1, 10],
simple: {
per_move_time_range: [43200, 604800],
},
byoyomi: {
main_time_range: [0, 604800],
period_time_range: [43200, 604800],
periods_range: [1, 10],
},
fischer: {
max_time_range: [86400, 604800],
time_increment_range: [43200, 604800],
},
concurrent_games: 500,
},
*/

Expand All @@ -222,6 +242,11 @@
*/
// allow_unranked: true,

/** Allowed ranked games
* @default true
*/
// allow_ranked: true,

/** +- the number of ranks allowed to play against this bot. Note that
* ranked games are always limited to +-9. 0 to disable rank restrictions.
* @default 0
Expand All @@ -233,23 +258,43 @@
*/
// allow_handicap: true,

/** Allow handicap games for unranked games
* @default true
*/
// allow_unranked_handicap: true,

/** Allowed komi range. Negative numbers indicate reverse Komi.
* @default [-99, 99]
*/
// allowed_komi_range: [-99, 99],

/** Allowed komi range
* @default true
*/
// allowed_komi_range: true,

/** Minimum rank to accept games from
* @default 0
* @minimum 0
* @maximum 35
*/
//min_rank: 0,
// min_rank: 0,

/** Hide the bot from the public bot list
* @default false
*/
//hidden: false,
// hidden: false,

/** Decline all new challenges. This implies hidden.
* @default false
*/
// decline_new_challenges: false,

/** Used for debugging, will issue a showboard command when we've loaded
* the board state into the bot
* @default false
*/
//showboard: false,
// showboard: false,

/** If set, bot moves will be delayed when made before `min_move_time` ms.
* This is primarily a user experience thing as can make players feel rushed
Expand All @@ -259,6 +304,11 @@
*/
// min_move_time: 1500,

/** Maximum amount of ongoing games to allow concurrently by the same player
* @default 1
*/
// max_games_per_player: 1,

/** Enable verbose logging.
* @values 0-2
* @default 0
Expand Down
140 changes: 109 additions & 31 deletions schema/Config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,27 @@
},
"allow_handicap": {
"type": "boolean",
"description": "Allow handicap games",
"description": "Allow handicap games for ranked games",
"default": true
},
"allow_unranked_handicap": {
"type": "boolean",
"description": "Allow handicap games for unranked games",
"default": true
},
"allowed_komi_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "Allowed komi range. Negative numbers indicate reverse Komi.",
"default": [
-99,
99
]
},
"hidden": {
"type": "boolean",
"description": "Hide the bot from the public bot list",
Expand Down Expand Up @@ -397,38 +415,101 @@
"TimeControlRanges": {
"type": "object",
"properties": {
"per_move_time_range": {
"type": "array",
"items": {
"type": "number"
"simple": {
"type": "object",
"properties": {
"per_move_time_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable times per period in seconds",
"default": "[10, 300] for live, [43200, 259200] for correspondence"
}
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable times per move. This is: - The period time in byo-yomi - The time increment and minimum move time in Fischer - The time per move in simple time",
"default": "[10, 300] for live, [43200, 259200] for correspondence"
"required": [
"per_move_time_range"
],
"additionalProperties": false,
"description": "Time control settings for Simple clocks"
},
"main_time_range": {
"type": "array",
"items": {
"type": "number"
"byoyomi": {
"type": "object",
"properties": {
"main_time_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable main times in seconds.",
"default": "[0, 3600] for live games, [0, 259200] for correspondence games"
},
"period_time_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable times per period in seconds",
"default": "[10, 300] for live, [43200, 259200] for correspondence"
},
"periods_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable number of periods.",
"default": [
1,
10
]
}
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable main times in seconds. This is only applicable for byo-yomi",
"default": "[0, 3600] for live games, [0, 86400] for correspondence games"
"required": [
"main_time_range",
"period_time_range",
"periods_range"
],
"additionalProperties": false,
"description": "Time control settings for byo-yomi clocks"
},
"periods_range": {
"type": "array",
"items": {
"type": "number"
"fischer": {
"type": "object",
"properties": {
"max_time_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable main times in seconds.",
"default": "[30, 600] for live games, [86400, 604800] for correspondence games"
},
"time_increment_range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "range of acceptable times for the time increment",
"default": "[10, 300] for live, [43200, 259200] for correspondence"
}
},
"minItems": 2,
"maxItems": 2,
"description": "Range of acceptable number of periods. This is only applicable for byo-yomi",
"default": [
1,
10
]
"required": [
"max_time_range",
"time_increment_range"
],
"additionalProperties": false,
"description": "Time control settings for fischer clocks"
},
"concurrent_games": {
"type": "number",
Expand All @@ -437,9 +518,6 @@
}
},
"required": [
"per_move_time_range",
"main_time_range",
"periods_range",
"concurrent_games"
],
"additionalProperties": false
Expand Down
Loading

0 comments on commit 40f1a8e

Please sign in to comment.