19#ifndef HEADER_AI_PROPERTIES_HPP
20#define HEADER_AI_PROPERTIES_HPP
22#include "race/race_manager.hpp"
23#include "utils/interpolation_array.hpp"
139 void checkAllSet(
const std::string &filename)
const;
150 float getSpeedCap(
float distance,
int ai_position,
int num_ai)
const;
A base class for all AI karts.
Definition: ai_base_controller.hpp:34
A base class for all AI karts.
Definition: ai_base_lap_controller.hpp:33
A simple class that stores all AI related properties.
Definition: ai_properties.hpp:40
float getSkiddingProbability(float distance) const
Returns the skidding probability dependent on the specified distance to the first player kart.
Definition: ai_properties.hpp:143
float m_skidding_threshold
TODO: ONLY USE FOR OLD SKIDDING! CAN BE REMOVED once the new skidding works as expected.
Definition: ai_properties.hpp:130
float m_false_start_probability
Probability of a false start.
Definition: ai_properties.hpp:92
bool m_disable_slipstream_usage
Used for low level AI to not give them a slipstream bonus.
Definition: ai_properties.hpp:107
float m_max_start_delay
Maximum start delay.
Definition: ai_properties.hpp:98
float getSpeedCap(float distance, int ai_position, int num_ai) const
Returns the fraction of maximum speed the AI should drive at, depending on the distance from the play...
Definition: ai_properties.cpp:128
bool m_handle_bomb
If the AI should actively try to pass on a bomb.
Definition: ai_properties.hpp:113
bool m_collect_avoid_items
Actively collect and avoid items.
Definition: ai_properties.hpp:110
float m_max_item_angle
Maximum direction change when trying to collect an item.
Definition: ai_properties.hpp:56
int m_nitro_usage
How the AI uses nitro.
Definition: ai_properties.hpp:123
bool disableSlipstreamUsage() const
Returns true if this kart should not even get a slipstream bonus.
Definition: ai_properties.hpp:161
float m_max_item_angle_high_speed
Maximum direction change when trying to collect an item while being on high-speed (i....
Definition: ai_properties.hpp:61
InterpolationArray m_skid_probability
The array of (distance, skid_probability) points.
Definition: ai_properties.hpp:78
InterpolationArray m_first_speed_cap
To cap maximum speed if the kart is ahead of the player.
Definition: ai_properties.hpp:81
void load(const XMLNode *skid_node)
Loads the AI properties from an XML file.
Definition: ai_properties.cpp:56
bool m_make_use_of_slipstream
True if the AI should avtively try to make use of slipstream.
Definition: ai_properties.hpp:101
int m_item_usage_skill
Determines the strategies used by the AI for items.
Definition: ai_properties.hpp:118
InterpolationArray m_collect_item_probability
To determine the probability of selecting an item.
Definition: ai_properties.hpp:85
float m_time_full_steer
Time for AI karts to reach full steer angle (used to reduce shaking of karts).
Definition: ai_properties.hpp:72
static float UNDEFINED
Used to check that all values are defined in the xml file.
Definition: ai_properties.hpp:52
float getItemCollectProbability(float distance) const
Returns the probability to collect an item depending on the distance to the first player kart.
Definition: ai_properties.hpp:155
void checkAllSet(const std::string &filename) const
Check if all AI properties are defined, and aborts if some are missing.
Definition: ai_properties.cpp:89
float m_straight_length_for_zipper
Minimum length of a straight in order to activate a zipper.
Definition: ai_properties.hpp:75
float m_min_start_delay
Minimum start delay.
Definition: ai_properties.hpp:95
std::string m_ident
An identifier like 'easy', 'medium' or 'hard' for this data set.
Definition: ai_properties.hpp:133
float m_bad_item_closeness_2
If a good item and a bad item are closer than this distance, a good item will be avoided (in order to...
Definition: ai_properties.hpp:68
float m_shield_incoming_radius
Distance at which a detected projectile triggers a shield.
Definition: ai_properties.hpp:88
A base class for AI that use navmesh to work.
Definition: arena_ai.hpp:42
This class manages a set of (x_i,y_i) points, x_i must be sorted.
Definition: interpolation_array.hpp:32
float get(float x) const
Returns the interpolated Y value for a given x.
Definition: interpolation_array.hpp:101
Difficulty
Game difficulty.
Definition: race_manager.hpp:230
This is the actual racing AI.
Definition: skidding_ai.hpp:117
This is a test version of the AI, which can be used to create new AIs, and compare them with the curr...
Definition: test_ai.hpp:75
utility class used to parse XML files
Definition: xml_node.hpp:48