Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the new
step
interpreter for TS, which allows full interactivity during the game at each step.This should allow for easier training in TS.
Major changes:
MinerBot.ts
,miner.py
) and do nothing bot (DoNothingBot.ts
) in TS.step
in the interpreter, alongside the oldrun
mode. The way to initialize the board is a hack, but it works for now.KoreIO
to async as training intf.js
involves async function calls.kore/Board.ts
,kore/Direction.ts
andkore/Point.ts
which is throwing errors when I tried to useboard.next()
to simulate full games. Might need to add some tests for these fixes?tick
function in TS bots to allow them to be imported inside the interpreter directly, so the training code and the agent code can run within the same process.episodeSteps
inkore/Configuration.ts
.currentPlayerId
mutable so that we can rotatecurrentPlayerId
in interpreter to allow agents totick
interactively on the same board.Out-standing issues:
board.next()
is implemented in python vs TS. Need more time to investigate this.Sample runs:
miner
vsdo_nothing
I have observed that
miner
performs consistently slightly worse instep
interpreter compared to python interpreter. I will investigate this further../main.py
(bot
) vsminer
I have not testing training with this new interpreter but this change is already very big and it is working fine on its own, so I think we can merge this first.
@bovard please kindly help review.