Difference between revisions of "Basics"

From Gladiabots Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== Maps ==
 
== Maps ==
 
+
 
[[Image:Map set your priorities.png|thumb|Best score map SET YOUR PRIORITIES]]
 
[[Image:Map set your priorities.png|thumb|Best score map SET YOUR PRIORITIES]]
 
+
 
Each map contains one or more bot starting positions for each team. Optionally maps can contain team bases and resources. Normally the same amount of bot starting positions and team bases are used for each team and the map objects have usually [https://en.wikipedia.org/wiki/Reflection_symmetry reflectional] or [https://en.wikipedia.org/wiki/Rotational_symmetry rotational] symmetry. Two starting positions or team bases that are symmetric belong to different teams. There exists an instantiation order for the bot starting positions rarely used in the game[https://forum.gladiabots.com/viewtopic.php?f=7&t=221]. Only a subset of all maps is used for ranked multiplayer.
 
Each map contains one or more bot starting positions for each team. Optionally maps can contain team bases and resources. Normally the same amount of bot starting positions and team bases are used for each team and the map objects have usually [https://en.wikipedia.org/wiki/Reflection_symmetry reflectional] or [https://en.wikipedia.org/wiki/Rotational_symmetry rotational] symmetry. Two starting positions or team bases that are symmetric belong to different teams. There exists an instantiation order for the bot starting positions rarely used in the game[https://forum.gladiabots.com/viewtopic.php?f=7&t=221]. Only a subset of all maps is used for ranked multiplayer.
 
+
 
== Game modes ==
 
== Game modes ==
 
+
 
=== Elimination ===
 
=== Elimination ===
 
+
 
The objective is to destroy more bots from the other team within the time limit. Bots can be destroyed by shooting them until they lost their shield and health or pushing them to the map borders. A game is evaluated as a draw if no team could destroy more bots after the time limit. The shield or health state of bots is not relevant to this objective.
 
The objective is to destroy more bots from the other team within the time limit. Bots can be destroyed by shooting them until they lost their shield and health or pushing them to the map borders. A game is evaluated as a draw if no team could destroy more bots after the time limit. The shield or health state of bots is not relevant to this objective.
 
+
 
=== Best score ===
 
=== Best score ===
 
+
 
The objective is to gather more resources than the other team within the time limit. Resources can be gathered by picking them up and moving them to an allied base. A game is evaluated as a draw if no team could gather more resources after the time limit. Neither the shield or health state of bots nor the count of remaining bots is relevant to this objective.
 
The objective is to gather more resources than the other team within the time limit. Resources can be gathered by picking them up and moving them to an allied base. A game is evaluated as a draw if no team could gather more resources after the time limit. Neither the shield or health state of bots nor the count of remaining bots is relevant to this objective.
 
+
 
== Time and Space ==
 
== Time and Space ==
 
+
 
Each map has a size of 50x50 meters. Each bot can shoot another bot up to the distance of 15 meters. This distance is divided in short range (up to 3 meters), medium range (3 to 8 meters) and long range (8 to 15 meters).
 
Each map has a size of 50x50 meters. Each bot can shoot another bot up to the distance of 15 meters. This distance is divided in short range (up to 3 meters), medium range (3 to 8 meters) and long range (8 to 15 meters).
 
+
Each second of the game time is divided in 4 ticks each with a duration of 250 milliseconds. At the beginning of a tick each bot uses its program to ''think'' what the next action should be. Then it executes this action for the duration of the tick. As the current time limit is 5 minutes in normal speed, the whole game lasts 1200 ticks.
+
During each second, there are 4 cycles (or ticks) where the bot decides its next action. Once the bot has decided its action, it will execute this action for the entire duration of the tick. Out of every tick the bot could decide whether or not to attack an enemy, pick up a resource, move towards an object, flee from an object, score a resource, or even decide to do nothing. Due note that outside of a few edge cases, any bot can see what action another bot is doing, as well as decide what to do based on the distance the bot is from itself.
 
+
 
== Bot Actions ==
 
== Bot Actions ==
 
+
 
What happens in detail if a bot performs a given action:
 
What happens in detail if a bot performs a given action:
 
+
 
* Attacking
 
* Attacking
 
** If a bot '''attacks''' another bot it aims or attacks for the whole tick. This action will be detected as '''attacking''' in the next tick.
 
** If a bot '''attacks''' another bot it aims or attacks for the whole tick. This action will be detected as '''attacking''' in the next tick.
Line 39: Line 38:
 
** If a bot '''drops a resource''' doesn't move for the whole tick. This action will be detected as '''idling''' in the next tick.
 
** If a bot '''drops a resource''' doesn't move for the whole tick. This action will be detected as '''idling''' in the next tick.
 
** To catch or score a resource one can be ~0.5 meters <span style="color:red">(GFX47 could you be more precise?)</span> away from the resource or base.
 
** To catch or score a resource one can be ~0.5 meters <span style="color:red">(GFX47 could you be more precise?)</span> away from the resource or base.
** Open question: What happens if 2 bots want to pick up the same resource in the very same tick from the same distance? <span style="color:red">(GFX47 could you answer this?)</span> (if it is bots from different teams, all bots picking up that resource will go to idle from it being an accepted invalid action, if it is only the same side, one of the bots will be chosen to pick up the resource)
+
** Open question: What happens if 2 bots want to pick up the same resource in the very same tick from the same distance? <span style="color:red">(GFX47 could you answer this?)</span>
 
* Idle, tag, team tag
 
* Idle, tag, team tag
 
** If a bot '''idles, tags or team tags''' it doesn't move for the whole tick. This action will be detected as '''idling''' in the next tick.
 
** If a bot '''idles, tags or team tags''' it doesn't move for the whole tick. This action will be detected as '''idling''' in the next tick.
 
+
== Bot shooting mechanics ==
+
== Health, shield and regeneration ==
 
+
 +
All bots have a certain amount of health and shield. The shield takes damage before you take any damage to your health, and can regenerate after the bot isn't damaged for over 3 seconds. However, and damage taken to your health is permanent. Any bot generates its fast enough that a fully destroyed shield regenerates in 3 seconds.
 +
 +
There is a separate topic discussing [[bot classes]]. It contains information about health, shield and regeneration differences.
 +
 +
=== Shooting process ===
 +
 +
Although the bot classes have very different shooting behavior, they all share the same shooting process:
 +
 +
# The bot will start aiming for the time of the ''aiming duration''
 +
 +
<!-- This is imo really messy and will end up being completely reworded, but you get the point -->
 +
# attacking for the time of the ''attack duration''
 +
#* shooting one or more rounds each with one or more bullets (specified by the ''bullet configuration'') towards the target
 +
#* Each bullet will either hit with the ''attack power'' or miss completely according to the ''precision''
 +
#** The bot's ''precision counter'' will increment by its ''precision value''. The precision value is determined by what range it is in at the moment the bullet is fired
 +
#*** If the ''precision counter'' is greater or equal to 100 the bullet will hit and the precision counter will be decremented by 100. Otherwise the bullet will miss
 +
# continue with 1.
 
There is a separate topic discussing [[bot shooting mechanics]].
 
There is a separate topic discussing [[bot shooting mechanics]].
 
== Bot classes and stats ==
 
 
There is a separate topic discussing [[bot classes]]. It contains information about movement speed, health, shield, regeneration and shooting stats differences.
 

Revision as of 20:12, 30 August 2017

Maps

Best score map SET YOUR PRIORITIES

Each map contains one or more bot starting positions for each team. Optionally maps can contain team bases and resources. Normally the same amount of bot starting positions and team bases are used for each team and the map objects have usually reflectional or rotational symmetry. Two starting positions or team bases that are symmetric belong to different teams. There exists an instantiation order for the bot starting positions rarely used in the game[1]. Only a subset of all maps is used for ranked multiplayer.

Game modes

Elimination

The objective is to destroy more bots from the other team within the time limit. Bots can be destroyed by shooting them until they lost their shield and health or pushing them to the map borders. A game is evaluated as a draw if no team could destroy more bots after the time limit. The shield or health state of bots is not relevant to this objective.

Best score

The objective is to gather more resources than the other team within the time limit. Resources can be gathered by picking them up and moving them to an allied base. A game is evaluated as a draw if no team could gather more resources after the time limit. Neither the shield or health state of bots nor the count of remaining bots is relevant to this objective.

Time and Space

Each map has a size of 50x50 meters. Each bot can shoot another bot up to the distance of 15 meters. This distance is divided in short range (up to 3 meters), medium range (3 to 8 meters) and long range (8 to 15 meters).

During each second, there are 4 cycles (or ticks) where the bot decides its next action. Once the bot has decided its action, it will execute this action for the entire duration of the tick. Out of every tick the bot could decide whether or not to attack an enemy, pick up a resource, move towards an object, flee from an object, score a resource, or even decide to do nothing. Due note that outside of a few edge cases, any bot can see what action another bot is doing, as well as decide what to do based on the distance the bot is from itself.

Bot Actions

What happens in detail if a bot performs a given action:

  • Attacking
    • If a bot attacks another bot it aims or attacks for the whole tick. This action will be detected as attacking in the next tick.
  • Moving and fleeing
    • If a bot moves to a target location that is within the range accessible by the current tick, then it moves there and idles for the rest of the tick. This action will be detected as idling in the next tick.
    • If a bot moves to a target location that is out of the range accessible by the current tick, then it moves as far as it could in the current tick. This action will be detected as moving in the next tick.
    • If a bot flees, then it flees as far as it could in the current tick. If the bot leaves the map by fleeing it will explode. This action will be detected as fleeing in the next tick.
    • If two bots come to close to each other when one or both of them are moving or fleeing, they collide and get pushed away from each other. The collision model of a bot is a circle with a radius of ~0.5 meters (GFX47 could you be more precise? Are there differences between SN, SG, AS and MG?).
  • Catch resource, secure resource, drop resource
    • If a bot catches a resource that is within the range accessible by the current tick, then it moves there, picks up the resource and idles for the rest of the tick. This action will be detected as idling in the next tick.
    • If a bot catches a resource that is out of the range accessible by the current tick, then it moves as far as it could in the current tick. This action will be detected as moving to a resource in the next tick.
    • If a bot secures a resource to a base that is within the range accessible by the current tick, then it moves there, scores the resource and idles for the rest of the tick. This action will be detected as idling in the next tick.
    • If a bot secures a resource to a base that is out of the range accessible by the current tick, then it moves as far as it could in the current tick. This action will be detected as moving to base in the next tick.
    • If a bot drops a resource doesn't move for the whole tick. This action will be detected as idling in the next tick.
    • To catch or score a resource one can be ~0.5 meters (GFX47 could you be more precise?) away from the resource or base.
    • Open question: What happens if 2 bots want to pick up the same resource in the very same tick from the same distance? (GFX47 could you answer this?)
  • Idle, tag, team tag
    • If a bot idles, tags or team tags it doesn't move for the whole tick. This action will be detected as idling in the next tick.

Health, shield and regeneration

All bots have a certain amount of health and shield. The shield takes damage before you take any damage to your health, and can regenerate after the bot isn't damaged for over 3 seconds. However, and damage taken to your health is permanent. Any bot generates its fast enough that a fully destroyed shield regenerates in 3 seconds.

There is a separate topic discussing bot classes. It contains information about health, shield and regeneration differences.

Shooting process

Although the bot classes have very different shooting behavior, they all share the same shooting process:

  1. The bot will start aiming for the time of the aiming duration
  1. attacking for the time of the attack duration
    • shooting one or more rounds each with one or more bullets (specified by the bullet configuration) towards the target
    • Each bullet will either hit with the attack power or miss completely according to the precision
      • The bot's precision counter will increment by its precision value. The precision value is determined by what range it is in at the moment the bullet is fired
        • If the precision counter is greater or equal to 100 the bullet will hit and the precision counter will be decremented by 100. Otherwise the bullet will miss
  2. continue with 1.

There is a separate topic discussing bot shooting mechanics.