Implement phases 3-4 + all modules: decision engine, automapper, character creator, quest system, progression optimizer, and hybrid LLM integration
- Phase 4 (Decision Engine): ActionQueue with 7 priority tiers, 4 behavior states (Idle/Explore/Combat/Loot), CombatAI with skill rotation and flee logic, GoalManager with survival override, DecisionEngine state machine integrated into the main game loop - Phase 3 (Automapper): Complete hybrid SQLite/Memvid architecture with WorldMapper orchestrator, room fingerprinting (SHA-256), bidirectional exit linking, exploration queue, A* pathfinding, HistoricalStorage with JSON fallback, SemanticSearch with keyword fallback, SyncManager with configurable triggers - Character Creator: State machine for automated character creation with stat rolling/optimization per class weights, race/class/gender selection, reroll logic with configurable thresholds - Quest System: Quest lifecycle tracking (discover->accept->complete), NLP-based objective extraction (kill/fetch/talk/explore), EXP/time prioritization, pending kill target tracking - Progression Optimizer: Grinding spot finder (EXP/hour), equipment comparison by weighted stats, skill rotation optimizer (DPS vs mana efficiency), session summary statistics - LLM Integration (hybrid): Async Ollama client with retry/backoff, LLMBrain coordinator for quest parsing, social AI, decision advice, and ambiguous text parsing fallback. SocialAI for detecting and responding to player messages (say/tell/shout/group/trade). Graceful degradation when Ollama is unavailable. All 214 tests passing.
This commit is contained in:
1 parent
f85c27a742
commit
bd211b6036
34 files changed
+5479
-233
No files matched your search
+23
-6
@@ -24,12 +24,29 @@ class CharacterConfig(BaseModel):
|
||||
play_style: str = "balanced"
|
||||
|
||||
|
||||
class AIConfig(BaseModel):
|
||||
"""AI engine configuration"""
|
||||
engine: str = "rule_based"
|
||||
llm_model: str = "llama3.2"
|
||||
decision_delay_ms: List[int] = Field(default=[200, 2000])
|
||||
exploration_strategy: str = "depth_first"
|
||||
class LLMProviderConfig(BaseModel):
|
||||
"""LLM provider configuration (Ollama / OpenAI-compatible)"""
|
||||
enabled: bool = True
|
||||
base_url: str = "http://localhost:11434"
|
||||
model: str = "llama3.2"
|
||||
temperature: float = 0.3
|
||||
max_tokens: int = 512
|
||||
timeout_seconds: float = 30.0
|
||||
max_retries: int = 2
|
||||
system_prompt: str = (
|
||||
"You are an AI playing a text-based MUD game. "
|
||||
"You must respond ONLY with the requested format. "
|
||||
"Be concise and precise. No explanations unless asked."
|
||||
)
|
||||
|
||||
|
||||
class AIConfig(BaseModel):
|
||||
"""AI engine configuration"""
|
||||
engine: str = "hybrid"
|
||||
llm_model: str = "llama3.2"
|
||||
decision_delay_ms: List[int] = Field(default=[200, 2000])
|
||||
exploration_strategy: str = "depth_first"
|
||||
llm: LLMProviderConfig = Field(default_factory=LLMProviderConfig)
|
||||
|
||||
|
||||
class MapperConfig(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user