Release 2022.3.1 · EntelectChallenge/2022-Arctica

Arctica - Release 2022.3.1

Hey contestants! Here is the next exciting release for Arctica! :snowman_with_snow:

Firstly, we apologize for such a delay in getting this release out. It was not for lack of effort :sweat_smile:

Some important information :bangbang:

  1. Tournament 3 has been set for Saturday, the 20th of August :trophy: We understand that this is not a lot of time at all. Please let us know if you need more time and we will try our best to push it out by a few days.

  2. We will be looking out for any bugs that are raised this weekend and this coming week. Please let us know about anything major!

  3. We are planning one further release (hope to have it out this weekend) that will add another mechanic to the game play. This is something that we hope will support smaller bots and challenge larger bots, providing some balancing!


Updates for this release:

Claiming Territory :fr: :it: :south_africa:

This new update introduces a competitive mechanic allowing your bots to fight over the territory that they have claimed. This comes in the form of two new actions, OccupyLand and LeaveLand. The gist of this feature is that if you send enough units to occupy a node, you will take ownership of that node at the end of the day-cycle (every 10 ticks). Look in the game-rules.md file under the territory section for more details on this! (note: we forgot to mention in the game-rules that the HomeGroundWeight for pressure calculation is set to 1.1)

Territory will now protect resources: any bot that harvests resources in another bot’s territory will receive a 30% decrease in reward.

Territory is now also contributing to the final game score, with each node in your territory contributing 2 points.

Slow bot bug fix :snail:

@kobus-v-schoor has been an absolute champion once again, and we have included a fix inspired by his PR for the slow bot bug! (See the game-rules for a small description of the issue)

Balancing :balance_scale:

Buildings have had their costs slightly reduced, as there were a few complaints that the building-based strategies were not viable enough.


We hope that you are all as excited about these new features as we are — the pressure is now on!
We will be online this weekend and the following week to address your concerns ASAP.

Thanks for all of your support!

With love, the EC team! :heart:

2 Likes

My honnest opinions:

Balancing :balance_scale:

Buildings have had their costs slightly reduced, as there were a few complaints that the building-based strategies were not viable enough.

This was really not needed…
People who had resource issues while building were simply just wasting.
**In a 4V4 setting even if I ignore Outpost and road the maps full very early on

Leaving a week for Claiming territory feature seems a bit rough,
But Admittedly the third event did not really change anything from a build perspective.

I also fear cases where we have bugs in the Claim Territory functions.

I will hit this hard next week.
Fortunately my own bot is complete up to now.

Going to be rough

Make no mistake though, Im really excited for this upgrade.

Just claiming territory for some could mean a very very complex extension of their strategies.

I have a pretty good structure to my bot (Unlike most years)
Every part of my strategy has a section. So I just need to plug it in and decide.

But theres a lot that will go into this.
Super excited though.

Will send more feedback on sunday,
I had some propper deadlines this week and for the next 24 hours im off.

1 Like

Please do not release the leaderboard’s exact results before the finals, so we have no idea what the actual rankings and positions are going into comic con.

I find that keeps things pretty fun.

Compared to, Oh we already have a definite #1 and #2.

2 Likes

Thanks EC team for the new release! Looks like a ton of work went into it, looking forward to exploring the new game mechanics. The new territory claiming feature looks great.

Would it maybe be possible to extend the deadline from the 20th till the 22nd? Then we have an extra weekend to work on our bots (not sure how this impacts the EC team?)

1 Like

Hi @Jordan,

I just downloaded the latest engine and tried to run a match. I didn’t have any issues on the previous version, but the game engine is now crashing.

Any idea what could cause this? I haven’t had a chance to try and debug it in detail yet, but I figured it’s worth flagging so long.

[DEBUG] [Core]:    at Engine.Services.TerritoryService.CreateNewLand(BotObject bot, Position position) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/TerritoryService.cs:line 128
   at Engine.Services.TerritoryService.<>c__DisplayClass15_0.<AddBuildingTerritory>b__1(Position position) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/TerritoryService.cs:line 113
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Engine.Services.TerritoryService.AddBuildingTerritory(BotObject bot, BuildingObject building) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/TerritoryService.cs:line 113
   at Engine.Services.TerritoryService.AddBuilding(BotObject bot, BuildingObject building) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/TerritoryService.cs:line 96
   at Engine.Handlers.Actions.BuildActionHandler.ProcessActionComplete(Node node, List`1 playerActions) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Handlers/Actions/BuildActionHandler.cs:line 93
   at Engine.Services.EngineService.SimulateTickForBots(IList`1 bots) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/EngineService.cs:line 427
   at Engine.Services.EngineService.ProcessGameTick() in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/EngineService.cs:line 193
   at Engine.Services.EngineService.GameRunLoop() in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/EngineService.cs:line 83
   at Engine.Services.SignalRService.<Startup>b__8_1(Task task) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/SignalRService.cs:line 122
[ERROR] [Shutdown]: Shutting down due to a critical error
[ERROR] [Shutdown]: Shutting down before a winner was found. Informing the runner.

Hey there, @rfnel , thanks for flagging the issue.
I’ve had a look where it is breaking, TerritoryService.cs, line 128. What confuses me is that is a simple return statement… :joy:

Could you dig a bit deeper and try and find what type of exception is coming through? I’ll definitely need a bit more information to work with.

That is very strange indeed. I’ll see what I can find, but that was the full stack trace from the console and since the game engine crashed completely, I don’t have a state file that I can review.

Is there any chance that the current version of the starter pack doesn’t contain the latest code?

Edit: @Jordan - I did some digging.

Two things I found that might help:
1 .) The previous version of the starter pack works perfectly; it runs to completion with the exact same bot.
2.) I committed my latest bot so that I can run on the portal - it worked fine on there as well. Is that running the latest engine?

Edit #2:

My bot was still using Position to track territory. I updated that to use the Land class instead, and that seemed to fix the issue. I honestly have no idea why though. However, while the game engine now runs all the way to round 2500, it crashes right at the end and doesn’t write the game logs to disk. The error is as follows:

Bot: b6eb7e30-ae7e-4d25-9a24-2e2b420a58c9
Bot: b2e313b1-bdf0-417d-a329-5d103626125c
fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'GameComplete'.
      System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[Domain.Models.Occupants]' to type 'Domain.Models.Position'.
         at Domain.Models.Position.Equals(Object obj) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Domain/Models/Position.cs:line 31
         at System.Collections.Generic.ObjectEqualityComparer`1.IndexOf(T[] array, T value, Int32 startIndex, Int32 count)
         at System.Array.IndexOf[T](T[] array, T value, Int32 startIndex, Int32 count)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
         at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
         at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
         at GameRunner.RunnerHub.GameComplete(GameCompletePayload gameCompletePayload) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/GameRunner/RunnerHub.cs:line 207
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteMethod(ObjectMethodExecutor methodExecutor, Hub hub, Object[] arguments)
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<Invoke>g__ExecuteInvocation|16_0(DefaultHubDispatcher`1 dispatcher, ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments, AsyncServiceScope scope, IHubActivator`1 hubActivator, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamCall)
[ERROR] [Core]: Failed to run GameRunLoop with error: An unexpected error occurred invoking 'GameComplete' on the server. InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[Domain.Models.Occupants]' to type 'Domain.Models.Position'.
ConState: Connected
ConState: Connected
Bot: b8855f50-dbdf-42b9-89ac-2d652491606f
Bot: b6eb7e30-ae7e-4d25-9a24-2e2b420a58c9
ConState: Connected
Bot: b2e313b1-bdf0-417d-a329-5d103626125c
[DEBUG] [Core]:    at Microsoft.AspNetCore.SignalR.Client.HubConnection.InvokeCoreAsyncCore(String methodName, Type returnType, Object[] args, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.SignalR.Client.HubConnection.InvokeCoreAsync(String methodName, Type returnType, Object[] args, CancellationToken cancellationToken)
   at Engine.Services.EngineService.GameRunLoop() in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/EngineService.cs:line 183
   at Engine.Services.SignalRService.<Startup>b__8_1(Task task) in /home/runner/work/2022-Arctica/2022-Arctica/game-engine/Engine/Services/SignalRService.cs:line 122
[ERROR] [Shutdown]: Shutting down due to a critical error
[INFO] [Shutdown]: Shutdown called with critical error, but a winner was already found. Moving on.

1 Like

I’m experiencing the same. The engine crashes at that cast.

2 Likes

I think I’m making some progress on tracking the issue down, in CreateNewLand the call var containedNode = worldStateService.NodeByPosition(position) returns null just before it crashes on my side (even with a seemingly valid position). Not sure why the stacktrace only fails at the return (maybe some weird dotnet optimization?)

Got this error as well, going back to previous version to at least completed training.

Can the Entelect team also fix the ReadMe documentation, the documentation is not fully complete, like how to build (Kobus assisted me with this).
Where can roads be placed?
Where can Outposts be placed?

@rfnel I think I’ve sorted out the casting error, the json serializer was checking for circular references and the Position model’s equality method didn’t check if the passed object’s type was correct. Maybe some of you can test out the patch so long? The starter pack can be downloaded here (bottom of the page): Fix casting error when serializing bot objects · kobus-v-schoor/2022-Arctica@e395bf0 · GitHub

2 Likes

I think I’ve found a fix for the other issue as well. Like I mentioned in my previous post, the NodeByPosition call can return null which causes the crash. Turns out the node positions that are returning null are the positions of scout towers. Not sure why the scout tower positions are considered for the territory claims as well, but by checking if the node is null before continuing the crash is prevented.

@Jordan I’ve opened a PR with the fix (https://github.com/EntelectChallenge/2022-Arctica/pull/25) - for those that want to start developing so long with the fixes in place, you can download the fixed starter pack here: Release p3-crash-fix · kobus-v-schoor/2022-Arctica · GitHub - if you want to compare my code to the main engine you can use this link: Comparing EntelectChallenge:master...kobus-v-schoor:p3-crash-fix · EntelectChallenge/2022-Arctica · GitHub

2 Likes

I would even suggest the 27th.

I may be wrong with this perception, but the field feels smaller than it was a year ago. I worry announcing the final deadline a week before it happens, will put newcomers off entering again. Especially if they’ve sunk effort into their bots, and are now forced to ditch that or suddenly restructure their week.

The same is true for the rest of us, but at least we know this is unusual.

1 Like

I feel the 27th is good as well, this year does feel much different, awesome competition to enter however its does seem quite rushed this year with no proper plan of timelines, full rules or even match logs compared to previous years.

The 27th should give enough time to run the matches prior to acutal finals cut off which is 21st Septmeber.

2 Likes

@kobus-v-schoor @rfnel Thanks for the work guys! I’m having family lunch today so will be back this afternoon to have a good look at your suggested fixes. In the meantime, just some thoughts:

In my initial planning, scout towers weren’t meant to be part of claimable territory. It completely slipped my mind that the positions of the expanding territory would envelop the scout towers. Maybe there is a simple fix to exclude those parts of the map in the CreateNewLand method.

Regarding the Position.Equals method: I decided to have Land extend Position because I wanted to retain some of the Position based territory functionality as well as add on the more complex Land based stuff. I took out the Type comparison because I was having an issue where Position and Land were being compared and it was returning false even though they had the same positions. Maybe I just give the Land object a Position field instead of making it inherit the X and Y

2 Likes

I do not want to be that guy,

But my take is that the 22nd (Monday) is best

From experience the team hardly ever ran the challenge matches on the Sunday.
So giving us the whole weekend before playoffs will be good.

**As one can see we still have some bugs that might prevent matches being played.

For the sake of other contestants, I feel the 27th or even 29th could be a bit of a stretch.
Myself, I would prefer the 27th. Just incase I need the time.

I am fortunate that I can spend a bit of time on my entry this comming week and Im fairly happy with what I have already.
But territory could be a very big part of the match.

Anyways, my point is:
Playoffs will be on 24 September.
If we have the Event start on 27 August, Playoffs start on 29 August.
Playoffs will likely last 1 week,

That means we will likely know the other 6 contestants on 5 September

If its stretched too late people might have issues with transportation, accommodation and even Comic Con Tickets for their +1’s

Now if I already lives in Johannesburg, This would not be an issue. But Im not.
If i wasnt fortunate to get a Golden ticket,

The 5th could have been a issue for me.
Anyways,

Im just thinking aloud.

We have pressure from both sides:
On the One Side, Us contestants need to finalize our entries.
On the Other Side, Us Contestants need to make preparations.

Now if you have a Golden Ticket or already live close to the venue.
Then theres no issues at all.

But if you lived in say Capetown.
Then the whole dynamic changes.

So we have to keep this in mind.
And I am really in the group that will benefit most from more time to work on my entry.

But I cannot ignore the flip side either.

The question is: Will a week make a difference to arrangements?
And I cant really answer that question.

I agree.

Due to time-constraints I almost didn’t enter at all this time round.

If there are breaking changes, a week is just too little time (IMO) to fix up existing bots and to build in new functionality. Anyone who’s unable to work on their bots this week is going to be at a horrible disadvantage, even if they had a pretty solid bot a week ago. The weekend of the 27th seems fair.

2 Likes

Though, The entry deadline will definately be linked to how long Bugs linger.

Perhaps the 27th will be best regardless.

Theres just too large a chance that we find a gamebreaking bug today and its fixed on Tuesday.

But yeah, I just do not want to ignore both sides.
**Far more people would be affected by a short deadline for their entry than would be affected by an Arrangement deadline.

We know that the 2 Golden ticket Holders are good.
From the next 6 it depends on if they are already in Johannesburg / Pretoria and can drive through.
From that perspective it could be better to add an extra week to the entry deadline.

Rock and a hard place.
Anyways, Will catch up later,

I need to start finalizing my territory upgrades AND start looking at my implementation for the new territory changes.

The implementation is very easy…
Deciding deciding when and where is a much bigger problem. Endgame will be quite interesting…

Well, Enjoy and Goodluck all.

1 Like

Random Question.

The rules mentions that there’s some form of Resource protection in your own territory,

Was this implemented and what is the impact of it?