40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
"""GOAP (Goal-Oriented Action Planning) module for agent decision making.
|
|
|
|
This module provides a GOAP-based AI system where agents:
|
|
1. Evaluate their current world state
|
|
2. Select the most relevant goal based on priorities
|
|
3. Plan a sequence of actions to achieve that goal
|
|
4. Execute the first action in the plan
|
|
|
|
Key components:
|
|
- WorldState: Dictionary-like representation of agent/world state
|
|
- Goal: Goals with dynamic priority calculation
|
|
- GOAPAction: Actions with preconditions and effects
|
|
- Planner: A* search for finding optimal action sequences
|
|
"""
|
|
|
|
from .world_state import WorldState
|
|
from .goal import Goal, GoalType
|
|
from .action import GOAPAction
|
|
from .planner import GOAPPlanner
|
|
from .goals import SURVIVAL_GOALS, ECONOMIC_GOALS, get_all_goals
|
|
from .actions import get_all_actions, get_action_by_type
|
|
from .debug import GOAPDebugInfo, get_goap_debug_info, get_all_agents_goap_debug
|
|
|
|
__all__ = [
|
|
'WorldState',
|
|
'Goal',
|
|
'GoalType',
|
|
'GOAPAction',
|
|
'GOAPPlanner',
|
|
'SURVIVAL_GOALS',
|
|
'ECONOMIC_GOALS',
|
|
'get_all_goals',
|
|
'get_all_actions',
|
|
'get_action_by_type',
|
|
'GOAPDebugInfo',
|
|
'get_goap_debug_info',
|
|
'get_all_agents_goap_debug',
|
|
]
|
|
|