Compact panic module

Posts: 50

Compact panic module

Post#1 » 12 Dec 2018, 22:12

i'm having quite some fun with the new counter mechanic, and i've found it extremely useful to solve an annoying situation.

We all want to know when enemy is about to score the winning point, or when there's one last and winning resource, but i've always found it nasty because of the
"if my advantage = 0" and "if res = 1" >> "panic"
but then your sg drop the res it's carrying and there's now more then 1 res on the ground and everything get screwed, so you rely on multiple exception and it sucks.

here's my solution:


with this simple algorithm you can easily detect when the enemy is scoring the winning point without bother about who is carrying how many resources. Everything gets treated as a "still possible to win" condition, so even if one or more of your bots drop a resource, it will still detect the winning point.
Also with the restriction of nodes, it can be quite a good way to optimize space in your ai.

with a minor edit you can also use it to check if the last resource on the ground is also the decisive one.


Hope it can help, and i hope this will encourage people to share part of their ideas to help the game growth.
sharing ideas will greatly help to increase the player base, it will smooth newcomers learning curve, and it will help us develops cooler strategies by improving on other players concepts.

Return to “Strategies”

Who is online

Users browsing this forum: No registered users and 1 guest