{"id":22771874,"url":"https://github.com/stonet2000/halite-4-tournament-runner","last_synced_at":"2025-04-15T05:30:40.577Z","repository":{"id":44821270,"uuid":"273353377","full_name":"StoneT2000/Halite-4-Tournament-Runner","owner":"StoneT2000","description":"Runs a local halite 4 tournament with your agents ranked by trueskill/elo","archived":false,"fork":false,"pushed_at":"2022-12-13T02:47:25.000Z","size":7475,"stargazers_count":18,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T16:21:21.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StoneT2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-18T22:37:57.000Z","updated_at":"2020-08-26T16:04:20.000Z","dependencies_parsed_at":"2023-01-28T05:15:50.968Z","dependency_job_id":null,"html_url":"https://github.com/StoneT2000/Halite-4-Tournament-Runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneT2000%2FHalite-4-Tournament-Runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneT2000%2FHalite-4-Tournament-Runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneT2000%2FHalite-4-Tournament-Runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneT2000%2FHalite-4-Tournament-Runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StoneT2000","download_url":"https://codeload.github.com/StoneT2000/Halite-4-Tournament-Runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249014534,"owners_count":21198622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T16:17:38.007Z","updated_at":"2025-04-15T05:30:40.553Z","avatar_url":"https://github.com/StoneT2000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Halite 4 Tournament Runner\n\nThis 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)\n\nEnsure you have [NodeJS](https://nodejs.org/) version 12.x or above installed\n\nTo run the tournament, fork this repo or clone it to your computer, and first install the [Dimensions](https://github.com/stonet2000/dimensions) package\n```\nnpm install dimensions-ai\n```\nthen run\n```\nnode run.js\n```\n\n![halite-tourney](assets/halite-tourney.gif)\n\nto 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.\n\nTo 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)\n\n## Configuration\n\nTo use ELO ranking instead of trueskill (the default), change line 60 in `run.js` to `Tournament.RANK_SYSTEM.ELO`\n\nThis 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`.\n\nYou can also configure how the tournament runs by editing the configs in line 71 in `tournamentConfigs`\n\n`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.\n\n`maxTotalMatches` is the total number of matches the tournament will allow itself to run before shutting down.\n\n`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\n\nBy default, some of these options are commented out, just uncomment them and change them as you like!\n\n## Retrieving data live from Tournament\n\nBy 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.\n\nAt the moment, `run.js` sets the IDs as follows\n`dimensionID: h4`, `tournamentID: h4ladder`\n\nSo a request in the shape of `/api/dimensions/:dimensionID/tournament/:tournamentID/ranks` becomes `/api/dimensions/h4/tournament/h4ladder/ranks`\n\n### Notes\n\nThe file `run.sh` has the script that is used to run the matches in the tournament\n\nUnfortunately, Windows doesn't work, you will need WSL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonet2000%2Fhalite-4-tournament-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstonet2000%2Fhalite-4-tournament-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonet2000%2Fhalite-4-tournament-runner/lists"}