Catch resource: bug or expected?

Zaxon
Script
Script
Posts: 21

Catch resource: bug or expected?

Post#1 » 27 Mar 2018, 17:06

The command "Catch Resource (Not an Ally is moving to)" doesn't work as I'd expect it to. I'd expect the ai to be executed one bot at a time, with bot 1 moving to the first resource. Bot 2 would then detect that the first resource is "busy", and choose the next closest resource. Instead what happens is all bots simultaneously choose the same resource, realize that other allies have also chosen that resource, and in the next tick, simultaneously choose the next resource together, and keep looping. Is that a bug, or somehow expected behavior?

pier4r
Skynet
Skynet
Posts: 3390

Re: Catch resource: bug or expected?

Post#2 » 27 Mar 2018, 17:35

It is expected. It is a long standing "initial problem" for the ones that want to distribute the harvesting. If you search in the forum you will find 2-3 similar threads, maybe some with the solution.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

Zaxon
Script
Script
Posts: 21

Re: Catch resource: bug or expected?

Post#3 » 27 Mar 2018, 19:18

It appears it is caused by evaluations for all bots done first, then moves are done in a second round.

Kaweb
Hello World
Hello World
Posts: 3

Re: Catch resource: bug or expected?

Post#4 » 27 Mar 2018, 21:24

Zaxon wrote:It appears it is caused by evaluations for all bots done first, then moves are done in a second round.


Yeah, from what I've read and understand, that's how it works. The AI is processed first at the beginning of each tick, each bot selects an action to perform, then they all execute it. So the filter is really checking if any ally was moving to that resource in the previous tick. Since no allies were moving there previously (as the game just started), multiple bots may end up going to the same resource.

I used tags (which are instant at the beginning of the turn and evaluated in instantiation order) to get around this.

Zaxon
Script
Script
Posts: 21

Re: Catch resource: bug or expected?

Post#5 » 27 Mar 2018, 22:28

Agreed. I think tags are the only solution.

Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest