Ai layouts

pier4r
Skynet
Skynet
Posts: 3315

Ai layouts

Post#1 » 24 Feb 2018, 20:51

I think it wouldn't be nice to share what are the main blocks on one's ai.

Not in detail, just the macro subdivision that can help brainstorming ideas.

From Telegram

Morris(Mcompany/theletter7):
Old layout is
1. If enemy not exist, score
2. Check if the bot is valid for retreating. If so, check if the bot should retreat. If so, retreat
3. Check if the bot should attack currently targeted. If so go to the bottom section which has limitations of it's own for attacking currently targeted
4. Check if I should attack long range. If so, go the the bottom section of long range which first links to the bottom section of medium range before doing it's long range attack order
5. Check if I should attack medium range. If so, go the the bottom section of medium range which first links to the bottom section of short range before doing it's medium range attack order
6. If self is in short range with an enemy. If so, go the the bottom section of long range which first links to the bottom section of currently targeted before doing it's short range attack order
7. Score?
8. Move to enemy





Pier A:
Nice. Can you also Post it in the strategies section?

For me instead is:
- debug
- tagging (old, to remove since 6.1.3 and alpha 7)


Now come the invariants based splitting
- do I have a resource or not?
- if yes, how to score
- if not
- how distant is the enemy?
Short, medium, long, out, not existing

For each section with the closest enemy at a certain range:
- desperate push (if it makes sense)
- retreat
- catch (if it makes sense)
- keep attacking
- push
- attack

The catch, push and keep attacking order variates with the bots, they are all different
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

mcompany
Autonomous Entity
Autonomous Entity
Posts: 865

Re: Ai layouts

Post#2 » 25 Feb 2018, 08:38

pier4r wrote:From Telegram

mcompany wrote:Old layout is
1. If enemy not exist, score
2. Check if the bot is valid for retreating. If so, check if the bot should retreat. If so, retreat
3. Check if the bot should attack currently targeted. If so go to the bottom section which has limitations of it's own for attacking currently targeted
4. Check if I should attack long range. If so, go the the bottom section of long range which first links to the bottom section of medium range before doing it's long range attack order
5. Check if I should attack medium range. If so, go the the bottom section of medium range which first links to the bottom section of short range before doing it's medium range attack order
6. If self is in short range with an enemy. If so, go the the bottom section of long range which first links to the bottom section of currently targeted before doing it's short range attack order
7. Score?
8. Move to enemy



viewtopic.php?f=3&t=1243
I'll post the changes that happened for my new tag based layout maybe a bit later, but definitely when I get back to my phone

User avatar
Athelinde
Algorithm
Algorithm
Posts: 64
Contact:

Re: Ai layouts

Post#3 » 25 Feb 2018, 17:52

My general layout that before Alpha12 kept me comfortable in lower master league:

1. Carrying resource: Secure or Drop
2. Short Range attacks
3. Retreat?
4. Medium Range attacks
5. Move?
6. Long Range attacks
7. Harvest

This setup is ok on killing less strong on harvesting.

odomobo
Hello World
Hello World
Posts: 6

Re: Ai layouts

Post#4 » 25 Feb 2018, 18:14

pier4r wrote:desperate push (if it makes sense)


When should you do a desperate push?

pier4r
Skynet
Skynet
Posts: 3315

Re: Ai layouts

Post#5 » 25 Feb 2018, 19:32

When the enemy is going only resources. It was a thing on set your priorities with arcueid
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
Tortuga
Script
Script
Posts: 11

Re: Ai layouts

Post#6 » 22 Mar 2018, 23:40

1. Drop resource.
2. Retreat.
3. Score Resource.
4. Attack.
5. Catch Resource.
6. Movement.

Each block can be implemented in a Sub AI with its own logic, to make it more understandable; or several related blocks, with similar logic, can be in the same Sub AI.
Drop Resource and Retreat have very similar conditions, for example, retreat if you are attacked by a Machinegun at medium distance or a shotgun at close range, and it is one of the most important and complex blocks.
In the attack block, I make an ordering of objectives by priorities and it is the second most complex and important block.
I use tagging in some blocks for different strategies.
According to my experience, with a good Retreat and a good attack, you can reach the league of great masters, then you need some additional strategies to move forward.

User avatar
Tortuga
Script
Script
Posts: 11

Simple examples

Post#7 » 23 Mar 2018, 21:26

Here I leave for the new ones, an example of merged drop-retreat-score modules. It's very simple and I do not think it's good for much, but it can be taken as a basis to improve.
Retreat.jpg
Retreat.jpg (44.09 KiB) Viewed 490 times


Another example of a simple attack module. The objectives are ordered by priority. It is also convenient to add conditions in some objectives.
Attack.jpg
Attack.jpg (21.63 KiB) Viewed 490 times


Labels can be used as Boolean variables (yes-no). And they can be used to perform actions at certain times and not be repeated.
Tag.jpg
Tag.jpg (6.83 KiB) Viewed 490 times

Return to “Strategies”

Who is online

Users browsing this forum: No registered users and 1 guest