This code allows you to run a local tournament ranking bots you provide by the Trueskill or ELO ranking algorithm (somewhat similar to the current Kaggle leaderboard ranking system)
Ensure you have NodeJS version 12.x or above installed
To run the tournament, fork this repo or clone it to your computer, and first install the Dimensions package
npm install dimensions-ai
then run
node run.js
to see a live display of a leaderboard of 4 bots. The sample bots used here for demonstration are the swarm bot by Yegor Biryukov: https://www.kaggle.com/yegorbiryukov/halite-swarm-intelligence, the getting started bot provided by Kaggle: https://www.kaggle.com/alexisbcook/getting-started-with-halite, and a bot that does nothing called stillbot.
To add more bots, add them to the list in run.js
at line 48. Note that you have to pass in paths to a file (so you can't use the Kaggle given random bot, you will have to copy it over yourself)
To use ELO ranking instead of trueskill (the default), change line 60 in run.js
to Tournament.RANK_SYSTEM.ELO
This will also automatically generate log files that record all output to standard error only. To turn this off, change line 65 in run.js
to false
.
You can also configure how the tournament runs by editing the configs in line 71 in tournamentConfigs
maxConcurrentMatches
is the number of matches the tournament will simutaneously run. Try not to set this way above the number of cores you have or you may run into timeout issues.
maxTotalMatches
is the total number of matches the tournament will allow itself to run before shutting down.
endDate
is the date in which to end the tournament. You can give the tournament a set lifespan. This takes in a javascript Date
object, see the comment for an example
By default, some of these options are commented out, just uncomment them and change them as you like!
By default, the API to retrieve such data is turned off. To turn it on, change observe
and activateStation
to true
at lines 38 and 39. This will serve an API at localhost:9000
. See https://github.com/StoneT2000/Dimensions/wiki/Dimensions-Station-API for a description of how to use the API. Through the API, you can retrieve rankings, start and stop a tournament and more.
At the moment, run.js
sets the IDs as follows
dimensionID: h4
, tournamentID: h4ladder
So a request in the shape of /api/dimensions/:dimensionID/tournament/:tournamentID/ranks
becomes /api/dimensions/h4/tournament/h4ladder/ranks
The file run.sh
has the script that is used to run the matches in the tournament
Unfortunately, Windows doesn't work, you will need WSL
Bumps express from 4.17.1 to 4.18.2.
Sourced from express's releases.
4.18.2
- Fix regression routing a large stack in a single route
- deps: [email protected]
- deps: [email protected]
- perf: remove unnecessary object clone
- deps: [email protected]
4.18.1
- Fix hanging on large stack of sync routes
4.18.0
- Add "root" option to
res.download
- Allow
options
withoutfilename
inres.download
- Deprecate string and non-integer arguments to
res.status
- Fix behavior of
null
/undefined
asmaxAge
inres.cookie
- Fix handling very large stacks of sync middleware
- Ignore
Object.prototype
values in settings throughapp.set
/app.get
- Invoke
default
with same arguments as types inres.format
- Support proper 205 responses using
res.send
- Use
http-errors
forres.format
error- deps: [email protected]
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Add
priority
option- Fix
expires
option to reject invalid dates- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- Remove set content headers that break response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Prevent loss of async hooks context
- deps: [email protected]
- deps: [email protected]
- Fix emitted 416 error missing headers property
- Limit the headers removed for 304 response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
... (truncated)
Sourced from express's changelog.
4.18.2 / 2022-10-08
- Fix regression routing a large stack in a single route
- deps: [email protected]
- deps: [email protected]
- perf: remove unnecessary object clone
- deps: [email protected]
4.18.1 / 2022-04-29
- Fix hanging on large stack of sync routes
4.18.0 / 2022-04-25
- Add "root" option to
res.download
- Allow
options
withoutfilename
inres.download
- Deprecate string and non-integer arguments to
res.status
- Fix behavior of
null
/undefined
asmaxAge
inres.cookie
- Fix handling very large stacks of sync middleware
- Ignore
Object.prototype
values in settings throughapp.set
/app.get
- Invoke
default
with same arguments as types inres.format
- Support proper 205 responses using
res.send
- Use
http-errors
forres.format
error- deps: [email protected]
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- deps: [email protected]
- deps: on-f[email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Add
priority
option- Fix
expires
option to reject invalid dates- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- Remove set content headers that break response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Prevent loss of async hooks context
- deps: [email protected]
- deps: [email protected]
... (truncated)
8368dc1
4.18.261f4049
docs: replace Freenode with Libera Chatbb7907b
build: [email protected]f56ce73
build: [email protected]24b3dc5
deps: [email protected]689d175
deps: [email protected]340be0f
build: [email protected]33e8dc3
docs: use Node.js name style644f646
build: [email protected]ecd7572
build: [email protected]Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps qs, body-parser and express. These dependencies needed to be updated together.
Updates qs
from 6.7.0 to 6.11.0
Sourced from qs's changelog.
6.11.0
- [New] [Fix]
stringify
: revert 0e903c0; addcommaRoundTrip
option (#442)- [readme] fix version badge
6.10.5
- [Fix]
stringify
: witharrayFormat: comma
, properly include an explicit[]
on a single-item array (#434)6.10.4
- [Fix]
stringify
: witharrayFormat: comma
, include an explicit[]
on a single-item array (#441)- [meta] use
npmignore
to autogenerate an npmignore file- [Dev Deps] update
eslint
,@ljharb/eslint-config
,aud
,has-symbol
,object-inspect
,tape
6.10.3
- [Fix]
parse
: ignore__proto__
keys (#428)- [Robustness]
stringify
: avoid relying on a globalundefined
(#427)- [actions] reuse common workflows
- [Dev Deps] update
eslint
,@ljharb/eslint-config
,object-inspect
,tape
6.10.2
- [Fix]
stringify
: actually fix cyclic references (#426)- [Fix]
stringify
: avoid encoding arrayformat comma whenencodeValuesOnly = true
(#424)- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] add note and links for coercing primitive values (#408)
- [actions] update codecov uploader
- [actions] update workflows
- [Tests] clean up stringify tests slightly
- [Dev Deps] update
eslint
,@ljharb/eslint-config
,aud
,object-inspect
,safe-publish-latest
,tape
6.10.1
- [Fix]
stringify
: avoid exception on repeated object values (#402)6.10.0
- [New]
stringify
: throw on cycles, instead of an infinite loop (#395, #394, #393)- [New]
parse
: addallowSparse
option for collapsing arrays with missing indices (#312)- [meta] fix README.md (#399)
- [meta] only run
npm run dist
in publish, not install- [Dev Deps] update
eslint
,@ljharb/eslint-config
,aud
,has-symbols
,tape
- [Tests] fix tests on node v0.6
- [Tests] use
ljharb/actions/node/install
instead ofljharb/actions/node/run
- [Tests] Revert "[meta] ignore eclint transitive audit warning"
6.9.7
- [Fix]
parse
: ignore__proto__
keys (#428)- [Fix]
stringify
: avoid encoding arrayformat comma whenencodeValuesOnly = true
(#424)- [Robustness]
stringify
: avoid relying on a globalundefined
(#427)- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] add note and links for coercing primitive values (#408)
- [Tests] clean up stringify tests slightly
- [meta] fix README.md (#399)
- Revert "[meta] ignore eclint transitive audit warning"
... (truncated)
56763c1
v6.11.0ddd3e29
[readme] fix version badgec313472
[New] [Fix] stringify
: revert 0e903c0; add commaRoundTrip
option95bc018
v6.10.50e903c0
[Fix] stringify
: with arrayFormat: comma
, properly include an explicit `[...ba9703c
v6.10.44e44019
[Fix] stringify
: with arrayFormat: comma
, include an explicit []
on a s...113b990
[Dev Deps] update object-inspect
c77f38f
[Dev Deps] update eslint
, @ljharb/eslint-config
, aud
, has-symbol
, tape
2cf45b2
[meta] use npmignore
to autogenerate an npmignore fileUpdates body-parser
from 1.19.0 to 1.20.1
Sourced from body-parser's releases.
1.20.0
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
1.19.2
- deps: [email protected]
- deps: [email protected]
- Fix handling of
__proto__
keys- deps: [email protected]
- deps: [email protected]
1.19.1
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]~1.6.18
Sourced from body-parser's changelog.
1.20.1 / 2022-10-06
- deps: [email protected]
- perf: remove unnecessary object clone
1.20.0 / 2022-04-02
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
1.19.2 / 2022-02-15
- deps: [email protected]
- deps: [email protected]
- Fix handling of
__proto__
keys- deps: [email protected]
- deps: [email protected]
1.19.1 / 2021-12-10
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]~1.6.18
830bdfb
1.20.1ecad1cc
build: [email protected]03b93cf
build: [email protected]2c611fc
build: [email protected]f199e94
perf: remove unnecessary object clone0123e12
build: [email protected]de1e6c2
build: [email protected]477ff13
build: [email protected]40c3fff
deps: [email protected]4aa84b7
build: [email protected]Updates express
from 4.17.1 to 4.18.2
Sourced from express's releases.
4.18.2
- Fix regression routing a large stack in a single route
- deps: [email protected]
- deps: [email protected]
- perf: remove unnecessary object clone
- deps: [email protected]
4.18.1
- Fix hanging on large stack of sync routes
4.18.0
- Add "root" option to
res.download
- Allow
options
withoutfilename
inres.download
- Deprecate string and non-integer arguments to
res.status
- Fix behavior of
null
/undefined
asmaxAge
inres.cookie
- Fix handling very large stacks of sync middleware
- Ignore
Object.prototype
values in settings throughapp.set
/app.get
- Invoke
default
with same arguments as types inres.format
- Support proper 205 responses using
res.send
- Use
http-errors
forres.format
error- deps: [email protected]
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Add
priority
option- Fix
expires
option to reject invalid dates- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- Remove set content headers that break response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Prevent loss of async hooks context
- deps: [email protected]
- deps: [email protected]
- Fix emitted 416 error missing headers property
- Limit the headers removed for 304 response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
... (truncated)
Sourced from express's changelog.
4.18.2 / 2022-10-08
- Fix regression routing a large stack in a single route
- deps: [email protected]
- deps: [email protected]
- perf: remove unnecessary object clone
- deps: [email protected]
4.18.1 / 2022-04-29
- Fix hanging on large stack of sync routes
4.18.0 / 2022-04-25
- Add "root" option to
res.download
- Allow
options
withoutfilename
inres.download
- Deprecate string and non-integer arguments to
res.status
- Fix behavior of
null
/undefined
asmaxAge
inres.cookie
- Fix handling very large stacks of sync middleware
- Ignore
Object.prototype
values in settings throughapp.set
/app.get
- Invoke
default
with same arguments as types inres.format
- Support proper 205 responses using
res.send
- Use
http-errors
forres.format
error- deps: [email protected]
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Add
priority
option- Fix
expires
option to reject invalid dates- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- Remove set content headers that break response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Prevent loss of async hooks context
- deps: [email protected]
- deps: [email protected]
... (truncated)
8368dc1
4.18.261f4049
docs: replace Freenode with Libera Chatbb7907b
build: [email protected]f56ce73
build: [email protected]24b3dc5
deps: [email protected]689d175
deps: [email protected]340be0f
build: [email protected]33e8dc3
docs: use Node.js name style644f646
build: [email protected]ecd7572
build: [email protected]Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps node-fetch from 2.6.0 to 2.6.7.
Sourced from node-fetch's releases.
v2.6.7
Security patch release
Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th party host while a redirect occurred
What's Changed
- fix: don't forward secure headers to 3th party by
@jimmywarting
in node-fetch/node-fetch#1453Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7
v2.6.6
What's Changed
- fix(URL): prefer built in URL version when available and fallback to whatwg by
@jimmywarting
in node-fetch/node-fetch#1352Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.5...v2.6.6
v2.6.2
fixed main path in package.json
v2.6.1
This is an important security release. It is strongly recommended to update as soon as possible.
See CHANGELOG for details.
Sourced from node-fetch's changelog.
Changelog
All notable changes will be recorded here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
What's Changed
- core: update fetch-blob by
@jimmywarting
in node-fetch/node-fetch#1371- docs: Fix typo around sending a file by
@jimmywarting
in node-fetch/node-fetch#1381- core: (http.request): Cast URL to string before sending it to NodeJS core by
@jimmywarting
in node-fetch/node-fetch#1378- core: handle errors from the request body stream by
@mdmitry01
in node-fetch/node-fetch#1392- core: Better handle wrong redirect header in a response by
@tasinet
in node-fetch/node-fetch#1387- core: Don't use buffer to make a blob by
@jimmywarting
in node-fetch/node-fetch#1402- docs: update readme for TS
@types/node-fetch
by@adamellsworth
in node-fetch/node-fetch#1405- core: Fix logical operator priority to disallow GET/HEAD with non-empty body by
@maxshirshin
in node-fetch/node-fetch#1369- core: Don't use global buffer by
@jimmywarting
in node-fetch/node-fetch#1422- ci: fix main branch by
@dnalborczyk
in node-fetch/node-fetch#1429- core: use more node: protocol imports by
@dnalborczyk
in node-fetch/node-fetch#1428- core: Warn when using data by
@jimmywarting
in node-fetch/node-fetch#1421- docs: Create SECURITY.md by
@JamieSlome
in node-fetch/node-fetch#1445- core: don't forward secure headers to 3th party by
@jimmywarting
in node-fetch/node-fetch#1449New Contributors
@mdmitry01
made their first contribution in node-fetch/node-fetch#1392@tasinet
made their first contribution in node-fetch/node-fetch#1387@adamellsworth
made their first contribution in node-fetch/node-fetch#1405@maxshirshin
made their first contribution in node-fetch/node-fetch#1369@JamieSlome
made their first contribution in node-fetch/node-fetch#1445Full Changelog: https://github.com/node-fetch/node-fetch/compare/v3.1.0...v3.1.2
3.1.0
What's Changed
- fix(Body): Discourage form-data and buffer() by
@jimmywarting
in node-fetch/node-fetch#1212- fix: Pass url string to http.request by
@serverwentdown
in node-fetch/node-fetch#1268- Fix octocat image link by
@lakuapik
in node-fetch/node-fetch#1281- fix(Body.body): Normalize
Body.body
into anode:stream
by@jimmywarting
in node-fetch/node-fetch#924- docs(Headers): Add default Host request header to README.md file by
@robertoaceves
in node-fetch/node-fetch#1316- Update CHANGELOG.md by
@jimmywarting
in node-fetch/node-fetch#1292- Add highWaterMark to cloned properties by
@davesidious
in node-fetch/node-fetch#1162- Update README.md to fix HTTPResponseError by
@thedanfernandez
in node-fetch/node-fetch#1135- docs: switch
url
toURL
by@dhritzkiv
in node-fetch/node-fetch#1318- fix(types): declare buffer() deprecated by
@dnalborczyk
in node-fetch/node-fetch#1345- chore: fix lint by
@dnalborczyk
in node-fetch/node-fetch#1348- refactor: use node: prefix for imports by
@dnalborczyk
in node-fetch/node-fetch#1346- Bump data-uri-to-buffer from 3.0.1 to 4.0.0 by
@dependabot
in node-fetch/node-fetch#1319- Bump mocha from 8.4.0 to 9.1.3 by
@dependabot
in node-fetch/node-fetch#1339- Referrer and Referrer Policy by
@tekwiz
in node-fetch/node-fetch#1057- Add typing for Response.redirect(url, status) by
@c-w
in node-fetch/node-fetch#1169
... (truncated)
1ef4b56
backport of #1449 (#1453)8fe5c4e
2.x: Specify encoding as an optional peer dependency in package.json (#1310)f56b0c6
fix(URL): prefer built in URL version when available and fallback to whatwg (...b5417ae
fix: import whatwg-url in a way compatible with ESM Node (#1303)18193c5
fix v2.6.3 that did not sending query params (#1301)ace7536
fix: properly encode url with unicode characters (#1291)152214c
Fix(package.json): Corrected main file path in package.json (#1274)b5e2e41
update version number2358a6c
Honor the size
option after following a redirect and revert data uri support8c197f8
docs: Fix typos and grammatical errors in README.md (#686)This version was pushed to npm by endless, a new releaser for node-fetch since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps nanoid from 3.1.10 to 3.2.0.
Sourced from nanoid's changelog.
Change Log
This project adheres to Semantic Versioning.
3.2
- Added
--size
and--alphabet
arguments to binary (by Vitaly Baev).3.1.32
- Reduced
async
exports size (by Artyom Arutyunyan).- Moved from Jest to uvu (by Vitaly Baev).
3.1.31
- Fixed collision vulnerability on object in
size
(by Artyom Arutyunyan).3.1.30
- Reduced size for project with
brotli
compression (by Anton Khlynovskiy).3.1.29
- Reduced npm package size.
3.1.28
- Reduced npm package size.
3.1.27
- Cleaned
dependencies
from development tools.3.1.26
- Improved performance (by Eitan Har-Shoshanim).
- Reduced npm package size.
3.1.25
- Fixed
browserify
support.3.1.24
- Fixed
browserify
support (by Artur Paikin).3.1.23
- Fixed
esbuild
support.3.1.22
- Added
default
andbrowser.default
topackage.exports
.3.1.21
- Reduced npm package size.
3.1.20
- Fix ES modules support.
3.1.19
- Reduced
customAlphabet
size (by Enrico Scherlies).
... (truncated)
23b1369
Release 3.2 version967788e
Remove TS test tools27eaa90
Simplify new binary toola9d9123
Update dependencies32b9bda
Allows passing size or custom alphabet via cli as args (#334)246d5f8
Update viteafdf9c9
doc: Fixed Typo (#335)90a446f
Update benchmark results8ba2319
bench: add @napi-rs/uuid
v4 (#333)f425778
Release 3.1.32 versionDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps lodash from 4.17.19 to 4.17.21.
f299b52
Bump to v4.17.21c4847eb
Improve performance of toNumber
, trim
and trimEnd
on large input strings3469357
Prevent command injection through _.template
's variable
optionded9bc6
Bump to v4.17.20.63150ef
Documentation fixes.00f0f62
test.js: Remove trailing comma.846e434
Temporarily use a custom fork of lodash-cli
.5d046f3
Re-enable Travis tests on 4.17
branch.aa816b3
Remove /npm-package
.This version was pushed to npm by bnjmnt4n, a new releaser for lodash since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps bl from 2.2.0 to 2.2.1.
8cb93f4
Bumped v2.2.1dacc4ac
Fix unintialized memory accessDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.