Questions

Any chance that a headless version of the game will be released?
Even in config, just some setting that disables console outputs would be helpful.

My current bot is reaching the 400 round limit very often, so playing multiple games to see where things can be improved, takes REALLY long.

1 Like

I would not be so certain that the console logging is the performance hit. The code is written in such a way that you can disable the output if you like…

Look into TowerDefenseConsoleMapRenderer in the core game engine code.
line:53 you could just return a empty string instead of

return renderMap(towerDefenseGameMap);

Scores are calculated by adding: … What does “End game HP x 100” mean?

HI @MS12

“End game HP” refers to your remaining health at the end of the match.
So it is your remaining health times 100 added to your total score to give each player their final score
This is a way to determine a winner in the event of a stalemate, but we are looking into maybe reworking this into a more active scoring system, basically gaining points for damage done to the other player throughout the match.

Hi @Sylonaz

We are working on adding a setting in the config.json file to disable the console output.

In the meantime @avanderw has a good workaround while you wait for our changes.

Hi

I am new to the challenge and have been spending the past few days looking at the files and I want to finally start coding a few commands and see what I can do. One thing I do not quite understand is how to run the bot or main through an ide for debugging.
Is this possible somehow and I would like to know how this is done.

Thanks in advance!

What language you using? You will have to edit the settings to avoid the timeout issue and you will have to setup remote debugging. But that will require changing the same code as hooking in your java bot directly. If you doing a Java bot and modify the runner to call your code directly and not as a process you can debug by running the runner in the IDE. All Java solutions I am afraid.

JavaBotRunner.java

@Override
protected int runBot() throws IOException {
String line = “java -jar “” + this.getBotFileName() + “””;
return RunSimpleCommandLineCommand(line, 0);
}

Or copy one of the json files from a round of the match output to your bot local directory and rename it to state.json and then just start your bot using the IDE, with relevant breakpoints etc depending on which IDE you are using. That is how I debugged my bot, when it did something I did not expect during a match.

1 Like

I used unit tests last year which ran off state files. Will definitely do the same this year.

Hi, Is it possible to have some consistency in the TextMap.txt? some data are separated by | and other by ; and the info blocks are enclosed by # * X and - . Or is it done so with a purpose?

The " | " vs " ; " was an oversight, but # * X was on purpose to categorize the different data fields. The textMap is not widely used, so it is great for us to have some feedback on how the parsers run through it.

I believe all values should be separated with " | " characters, but before we change everything in the file (and thereby break old bots) we need to find out how to best approach this.

I’m happy if it wont change, will just mean I have to build a more generic phrase. One suggestion I have but can work around is to remove the [x,y] values of the missiles and building data and use the x|y|… format on them too so that the separators stay the same. Unless someone can help me phrase the json file under 500ms in C#

Just an interesting Game Engine error in the event of an tie:

Player A Health=100, Energy=28, Score=7692
Player B Health=100, Energy=28, Score=7692

Removed map

=======================================
The game ended in a tie

java.lang.NullPointerException
at za.co.entelect.challenge.bootstrapper.GameBootstrapper.lambda$getGameCompleteHandler$2(GameBootstrapper.java:174)
at za.co.entelect.challenge.engine.runner.GameEngineRunner.publishGameComplete(GameEngineRunner.java:159)
at za.co.entelect.challenge.engine.runner.GameEngineRunner.processRound(GameEngineRunner.java:112)
at za.co.entelect.challenge.engine.runner.GameEngineRunner.startNewGame(GameEngineRunner.java:74)
at za.co.entelect.challenge.bootstrapper.GameBootstrapper.startGame(GameBootstrapper.java:130)
at za.co.entelect.challenge.bootstrapper.GameBootstrapper.main(GameBootstrapper.java:47)

1 Like

Great catch, thanks!

You can track the progress here

Will the tournament be scored by wins or game score? If wins only then I should just go win as fast as possible, but if score I would want to slow down against a weak opponent to get more points from energy generation for example?

The tournament will be scored on wins, but in case of a tie (two people with the same amount of wins), the game scores will be used as a tie breaker.

So, if you can guarantee a tie and you know you score higher than your opponent… then a viable strategy might be to draw it to a tie. Strange concept. Though guarantee a tie is not really a valid thing.

It looks like the Attack building fires a missile as soon as it’s been constructed, is this intended?

Yes, in the game-engine code you will find that buildings are created with “this.weaponCooldownTimeLeft = 0;”
This means the weapon starts out being ready to fire immediately.

Some stuff that might interest you guys are the order in which major events happen. In the game-engine code, under the “TowerDefenseRoundProcessor.java” file, the important part happens here:

// we fulfill bot commands here. start constructing new buildings for example
        processCommands(commands);

// run the construction timer on each building, this is where buildings go from lowercase letters to uppercase letters
        constructBuildings();

// every attack building with an empty weaponCooldownTimer gets a new missile, on top of the building position
        createMissilesFromGuns();

// every missile gets moved as much as they should
        calculateMissileMovement();

// buildings with 0 health get removed here
        removeDeadEntities();

// calculate how many constructed energy buildings a player has, and award them energy based on this (+round income energy)
        addResources();

So notice how missiles are moved right after they are created. That is why it seems like they start out in-front of the attack buildings. Missiles are also created in the same round as the fully constructed building (given that the cooldown timer is 0).

We had to choose a sequence for these events to happen in, especially because they are not independent of each other, and the sequence is essentially wrapped-around at the start and end (because of the previous rounds and the upcoming rounds).

2 Likes

What is a clean ‘do nothing’ command, not writing to the command file or giving something like -1,-1,-1?