Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Name string // The name of the action. Utility func(*Reasoner) float64 // The utility of the action. Execute func() // The function that executes the action. }
Action represents an action that can be performed by an agent.
type Consideration ¶
Consideration represents a consideration that can be used to calculate the utility of an action. TODO: Introduce parameters for considerations. - This could be entity a and b for calculating the distance between two entities, etc.
type Reasoner ¶
type Reasoner struct { Actions []*Action // The actions that can be performed by the agent. Considerations map[string]Consideration // The considerations that can be used to calculate the utility of an action. }
Reasoner represents the root of the AI system. It contains all the actions and considerations.
func (*Reasoner) BestAction ¶
BestAction returns the action with the highest utility.
Click to show internal directories.
Click to hide internal directories.