Class: Contest::AI::Base
Overview
Base class of AI, it holds the most important data
Direct Known Subclasses
HyperRankAI, MasterRankAI, NormalRankAI, RandomAI, StrongHyperRankAI, StrongSuperRankAI, SuperRankAI
Instance Attribute Summary collapse
-
#can_make_combo ⇒ Boolean
readonly
Can the AI intentionally try to make a combo?.
-
#can_see_move_appeal ⇒ Boolean
readonly
Can the AI see a move's appeal?.
-
#can_see_move_condition ⇒ Boolean
readonly
Can the AI see a move's condition?.
-
#creature ⇒ PFM::ContestCreature
readonly
Get the creature the AI controls.
-
#level ⇒ Integer
readonly
Get the level of the AI.
-
#logic ⇒ Contest::Logic
readonly
Get the Logic class of the contest.
-
#noise ⇒ Float
readonly
Noise to be used in heuristics computations.
-
#scene ⇒ Contest::Scene
readonly
Get the scene that initialized the AI.
Class Method Summary collapse
-
.register(level, klass)
Register a new AI.
-
.registered(level) ⇒ Class<Contest::AI::Base>
Get a registered AI.
Instance Method Summary collapse
-
#initialize(scene, creature, level) ⇒ Base
constructor
Create a new AI instance.
-
#trigger ⇒ Contest::Move
Get the action the AI wants to do.
Constructor Details
#initialize(scene, creature, level) ⇒ Base
Create a new AI instance
35 36 |
# File 'docs/6_Contest_30_AI.rb', line 35 def initialize(scene, creature, level) end |
Instance Attribute Details
#can_make_combo ⇒ Boolean (readonly)
Can the AI intentionally try to make a combo?
26 27 28 |
# File 'docs/6_Contest_30_AI.rb', line 26 def can_make_combo @can_make_combo end |
#can_see_move_appeal ⇒ Boolean (readonly)
Can the AI see a move's appeal?
20 21 22 |
# File 'docs/6_Contest_30_AI.rb', line 20 def can_see_move_appeal @can_see_move_appeal end |
#can_see_move_condition ⇒ Boolean (readonly)
Can the AI see a move's condition?
23 24 25 |
# File 'docs/6_Contest_30_AI.rb', line 23 def can_see_move_condition @can_see_move_condition end |
#creature ⇒ PFM::ContestCreature (readonly)
Get the creature the AI controls
14 15 16 |
# File 'docs/6_Contest_30_AI.rb', line 14 def creature @creature end |
#level ⇒ Integer (readonly)
Get the level of the AI
17 18 19 |
# File 'docs/6_Contest_30_AI.rb', line 17 def level @level end |
#logic ⇒ Contest::Logic (readonly)
Get the Logic class of the contest
11 12 13 |
# File 'docs/6_Contest_30_AI.rb', line 11 def logic @logic end |
#noise ⇒ Float (readonly)
Noise to be used in heuristics computations
29 30 31 |
# File 'docs/6_Contest_30_AI.rb', line 29 def noise @noise end |
#scene ⇒ Contest::Scene (readonly)
Get the scene that initialized the AI
8 9 10 |
# File 'docs/6_Contest_30_AI.rb', line 8 def scene @scene end |
Class Method Details
.register(level, klass)
Register a new AI
45 46 |
# File 'docs/6_Contest_30_AI.rb', line 45 def register(level, klass) end |
.registered(level) ⇒ Class<Contest::AI::Base>
Get a registered AI
50 51 |
# File 'docs/6_Contest_30_AI.rb', line 50 def registered(level) end |
Instance Method Details
#trigger ⇒ Contest::Move
Get the action the AI wants to do
39 40 |
# File 'docs/6_Contest_30_AI.rb', line 39 def trigger end |