Class: Ai4r::Search::MCTS::Node
- Inherits:
-
Struct
- Object
- Struct
- Ai4r::Search::MCTS::Node
- Defined in:
- lib/ai4r/search/mcts.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#children ⇒ Object
Returns the value of attribute children.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#state ⇒ Object
Returns the value of attribute state.
-
#value ⇒ Object
Returns the value of attribute value.
-
#visits ⇒ Object
Returns the value of attribute visits.
Instance Method Summary collapse
-
#initialize(state, parent = nil, action = nil) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(state, parent = nil, action = nil) ⇒ Node
Returns a new instance of Node.
35 36 37 |
# File 'lib/ai4r/search/mcts.rb', line 35 def initialize(state, parent = nil, action = nil) super(state, parent, action, [], 0, 0.0) end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
34 35 36 |
# File 'lib/ai4r/search/mcts.rb', line 34 def action @action end |
#children ⇒ Object
Returns the value of attribute children
34 35 36 |
# File 'lib/ai4r/search/mcts.rb', line 34 def children @children end |
#parent ⇒ Object
Returns the value of attribute parent
34 35 36 |
# File 'lib/ai4r/search/mcts.rb', line 34 def parent @parent end |
#state ⇒ Object
Returns the value of attribute state
34 35 36 |
# File 'lib/ai4r/search/mcts.rb', line 34 def state @state end |
#value ⇒ Object
Returns the value of attribute value
34 35 36 |
# File 'lib/ai4r/search/mcts.rb', line 34 def value @value end |
#visits ⇒ Object
Returns the value of attribute visits
34 35 36 |
# File 'lib/ai4r/search/mcts.rb', line 34 def visits @visits end |