Overview
The AI Inspector is a tool that enables you to “see inside the brain” of the AI.
In other words, it shows you a current view of the policy mapping. You can see what the AI’s action would be given a certain state. With this information you can design better training, targeting specific improvement areas.
What are the State(s) in AI Arena?
The state is a snapshot of the environment at any point in time. The AI uses this observation to decide what to do. In other words, the state is the context used in the neural network's decision making processÂą.
For example, some researchers use all of the pixels on the screen as the state, and let the AI figure out what the pixels represent. Other researchers hand-craft features based on their opinion of what is important in the decision making process.
For AI Arena, we hand-crafted the features because we want to constrain the size of neural networks used.
Why? We want equal opportunity. By avoiding the use of Convolutional Neural Networks (CNNs), which can be computationally intensive—we reward users for being able to train their AIs better, not for having more computational resources.
Feature Groups
- Description: There are 16 rays that get projected out from your fighter to identify platforms around it. If a ray intersects then it will calculate a score between 0 and 1 depending on how close it is to your fighter. A value of 1 means it’s overlapping your fighter and a value of 0 means it’s at the other end of the map. If a ray does not intersect then it gets a value of 0.
- Range: [0, 1]
- Description: There are 16 rays that get projected out from your fighter to identify platforms around it. If a ray intersects then it will get assigned a value depending on the type of platform that it intersects with. If a ray does not intersect then it gets a value of -1.
- Hard Platform and Wall: 1
- Soft Platform: 0.5
- Ledge: 1.5
- Range: {-1, 0.5, 1, 1.5}
- Description: There are 16 rays that get projected out from your fighter to identify projectiles around it. If a ray intersects then it will calculate a score between 0 and 1 depending on how close it is to your fighter. A value of 1 means it’s hitting your fighter and a value of 0 means it’s at the other end of the map. If a ray does not intersect then it gets a value of 0.
- Range: [0, 1]
- Description: There are 16 rays that get projected out from your fighter to identify projectiles around it. If a ray intersects then it will calculate a score between 0 and 1 depending on if it’s travelling towards your fighter or not. If the projectile is heading in your direction then the value will be close to 1. If it is travelling in the opposite direction then it will get a score of 0. This value then gets multiplied by -1 if it’s your opponent’s projectile and 1 if it’s your fighter’s projectile. If a ray does not intersect then it gets a value of 0.
- Range: [-1, 1]
- Description: There are 16 rays that get projected out from your fighter to identify projectiles around it. If a ray intersects then it will get a value of 1, 0, or -1 depending on the projectile’s elemental advantage (relative to your fighter). To learn more about what this means, refer to the “Elemental Advantage” feature group below. If a ray does not intersect then it gets a value of 0.
- Range: {-1, 0, 1}
- Description: Binary encoding of your action and your opponent’s action. This tells the AI what it is currently doing and what the opponent is doing. The encoding comprises of three parts:
- Direction being pressed
- Action being done (jump, shield, grab, attack, or special)
- Whether the fighter is in a vulnerable state (i.e. hitstun)
- Range: [0, 1]
- Description: Your position on the map. This includes both the X and Y position, rescale between -1 and 1. For the x-axis, a -1 means it’s all the way to the left and a value of 1 means it’s all the way to the right. For the y-axis, a -1 means it’s all the way to the top and a value of 1 means it’s all the way to the bottom.
- Range: [-1, 1]
- Description: The opponent’s position on the map. This includes both the X and Y position, rescale between -1 and 1. For the x-axis, a -1 means it’s all the way to the left and a value of 1 means it’s all the way to the right. For the y-axis, a -1 means it’s all the way to the top and a value of 1 means it’s all the way to the bottom.
- Range: [-1, 1]
- Description: The direction of your fighter and your opponent. A value of 1 means the fighter is facing towards the right and a value of -1 means the fighter is facing towards the left.
- Range: {-1, 1}
- Description: The distance between your fighter and your opponent. We then scale down the distance to be between 0 and 1. The larger the value, the farther away the opponent is.
- Range: [0, 1]
- Description: Angle between your fighter and your opponent. This feature informs your AI whether you’re to the left, right, above, or below the opponent. We use two features to solve the problem of discontinuity with a single value for the angle. We use the sin and cos of the radian.
- Range: [-1, 1]
- Description: The amount of stocks remaining for your fighter and your opponent. The value is divided by 3, which keeps the range between 0 and 1.
- Range: [0, 1]
- Description: The amount of percentage damage for your fighter and your opponent. The percentage is divided by 200. Most value should be between 0 and 1.5, but can get as high as 3 if someone’s percentage goes up to 600%.
- Range: [0, 3]
- Description: The value of the elemental gauge for your fighter and your opponent. A value of 1 means that it is full and the special is ready to use.
- Range: [0, 1]
- Description: If your fighter has an elemental advantage then this value will be 1. If it is at an elemental disadvantage then it will have a value of -1. Otherwise, the value is 0. The advantages work as follows:
- Fire > Electric
- Electric > Water
- Water > Fire
- Range: {-1, 0, 1}
- Description: Your fighter’s weight minus the opponent’s weight, then rescaled to be within the range below. A value of -1 means your fighter is the lightest weight and your opponent is the heaviest. A value of 1 means your fighter is the heaviest weight and your opponent is the lightest. Anything in between is a linear interpolation.
- Range: [-1, 1]
Inspector Walkthrough
Video tutorial of the AI Inspector Coming Soon! 🔜
Notes:
- The state does not encapsulate all of the information of the environment, just what the AI researcher deems necessary.