Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7c4ee2e
Add unit tests for intelligence lifecycle, loader order, metrics, mod…
mCodex Jul 17, 2026
86b79ac
Refactor unit tests for containers and intelligence modules to align …
mCodex Jul 17, 2026
a0fb85b
refactor: Remove legacy HuntAnalyzer and Monster Inspector, transitio…
mCodex Jul 17, 2026
62b83a5
fix: intelligence summary
mCodex Jul 20, 2026
3258958
chore: cleaning up code
mCodex Jul 20, 2026
c3a08ff
feat(intelligence): add outcome_reasons module with ClosureReason enum
mCodex Jul 20, 2026
b02286c
feat(intelligence): add event_schema.lua with 25 canonical event types
mCodex Jul 20, 2026
02012dc
Add IntelligenceEventFactory with TDD tests (Task 0.3)
mCodex Jul 20, 2026
ee05633
feat(intelligence): add LRU event deduplicator
mCodex Jul 20, 2026
b03d6a7
fix: remove duplicate EventBus registrations in tactical_intelligence
mCodex Jul 21, 2026
b9f12f4
feat(intelligence): add OutcomeRecord for decision outcome tracking
mCodex Jul 21, 2026
cb65907
feat(intelligence): add DecisionRecord for ML decision tracking
mCodex Jul 21, 2026
72f7f50
feat(intelligence): add episode_base.lua with lifecycle management
mCodex Jul 21, 2026
cfe69c9
Add encounter_tracker module with TDD tests
mCodex Jul 21, 2026
c413e0c
feat: add route_segment_tracker and hunt_tracker episode modules
mCodex Jul 21, 2026
f6749c5
Add loot episode tracker (Task 1.5)
mCodex Jul 21, 2026
0a49f32
Wire episode trackers into intelligence runtime
mCodex Jul 21, 2026
99cfd3a
Add resource_cost module for action cost tracking
mCodex Jul 21, 2026
bf74c18
fix: loot observer emits canonical events via IntelligenceEventFactory
mCodex Jul 21, 2026
c345e58
Add item_value_provider for loot value estimation (Task 2.2)
mCodex Jul 21, 2026
e4baddf
feat: add reward_vector.lua — versioned multi-objective reward vector
mCodex Jul 21, 2026
e0c0c59
Add reward_normalizer for stable training (Task 3.2)
mCodex Jul 21, 2026
64aa6fb
Wire reward system into intelligence runtime
mCodex Jul 21, 2026
83ee80f
add intelligence model interface v2 with mode-gated predict/observe
mCodex Jul 21, 2026
d978d91
Add CANARY mode to model registry
mCodex Jul 21, 2026
2090a49
Replace 12 alias Bayesian models with 7 genuine contextual models
mCodex Jul 21, 2026
3672918
feat: add decision_log.lua for offline evaluation (Task 5.1)
mCodex Jul 21, 2026
1824f41
feat: add confidence interval calculator (Task 5.4)
mCodex Jul 21, 2026
de59251
Add promotion_report.lua with 17-gate promotion evaluation
mCodex Jul 21, 2026
ba2c55b
feat: add replay evaluator for offline decision evaluation (task 5.2)
mCodex Jul 21, 2026
3206090
feat: add kill_switch.lua for emergency ML disable
mCodex Jul 21, 2026
e2bc79f
feat: add adjustment bounds enforcer for canary bounded integration
mCodex Jul 21, 2026
953dbe9
Add rollback monitor guardrail with threshold checks
mCodex Jul 21, 2026
f4d3e2f
feat(7.1): conservative reranker with bounded model adjustments
mCodex Jul 21, 2026
cb0d9d9
feat: add target switch guard to prevent target thrashing
mCodex Jul 21, 2026
cf61bed
Wire TargetBot and CaveBot guardrails into intelligence runtime
mCodex Jul 21, 2026
49a045c
feat: add loot_priority module (Task 8.1)
mCodex Jul 21, 2026
06ffd79
Wire loot priority into intelligence runtime
mCodex Jul 21, 2026
5489b4e
feat(intelligence): add decision explainer for human-readable decisio…
mCodex Jul 21, 2026
4719fe5
wire decision explainer into intelligence runtime
mCodex Jul 21, 2026
45e8727
fix: update runtime references from old model names to new catalog
mCodex Jul 21, 2026
40d64ce
fix: add new intelligence modules to _Loader.lua
mCodex Jul 21, 2026
8029bd4
fix: add missing nExBot registration to reward_vector, item_value_pro…
mCodex Jul 21, 2026
88eddae
fix: table.unpack -> unpack for Lua 5.1/LuaJIT compatibility
mCodex Jul 21, 2026
12fe98c
fix: replace unpack with manual copyArray for OTClient compat
mCodex Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*configs
storage/
private/
private/
.tokensave
70 changes: 52 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nExBot

![Version](https://img.shields.io/badge/version-4.0.0-blue)
![Version](https://img.shields.io/badge/version-5.1.0-blue)
![License](https://img.shields.io/badge/license-MIT-green)
![Lua](https://img.shields.io/badge/Lua-5.1-purple)

Expand All @@ -16,19 +16,49 @@ Install paths:
- **vBot:** `%APPDATA%/OTClientV8/<ServerName>/bot/nExBot`
- **OTCR:** `~/.local/share/<otcr-data>/<ServerName>/bot/nExBot`

## v5.1.0 — Tactical Intelligence, Profile Reconnect & Character-Bound State Remediation

This release delivers a comprehensive remediation of state management, persistence, and tactical intelligence:

- **Atomic profile switching** — CaveBot/TargetBot profile changes preserve desired ON/OFF state, commit in single transaction
- **Character-bound state** — Per-character, per-root-profile UnifiedStorage files (schema v6), full isolation
- **Tactical Intelligence crash safety** — `next = nil` sandbox handled, section isolation, incremental projections
- **Analytics contract separation** — `TelemetryClient` (outbound), `HuntMetrics` (local), `ClientTelemetry` (OTClient signals)
- **Desired vs Effective state** — Explicit inhibitors, runtime state never overwrites user preference
- **Explicit origins** — Every mutation carries `USER`/`INITIAL_RESTORE`/`RECONNECT_RESTORE`/etc.
- **Silent restoration** — UI restores without triggering persistence callbacks
- **Control registry** — All toggles declaratively registered with explicit scopes
- **Lifecycle adapter** — `onGameStart`/`onGameEnd` drive state coordinator, generation guards on all async work
- **Performance** — ≥70% Tactical CPU reduction target, no-change projection p95 <2ms

See [Release Notes](docs/RELEASE_NOTES.md) and [Remediation Summary](docs/REMEDIATION_SUMMARY.md) for details.

## Modules

| Module | Function |
|--------|----------|
| **HealBot** | Spell/potion healing at configurable HP thresholds. 75ms response. |
| **AttackBot** | Attack spell/rune rotation with AoE optimization |
| **CaveBot** | Waypoint navigation, floor-change safety, supply refills, 50+ pre-built routes |
| **TargetBot** | 9-stage priority targeting, Monster Insights AI, movement coordination |
| **Hunt Analyzer** | Session analytics — kills/hr, XP/hr, profit, Hunt Score |
| **Containers** | Event-driven BFS, O(1) operations, generation tracking, quiver management 🎒 |
| **TargetBot** | 9-stage priority targeting, Tactical Intelligence integration, movement coordination |
| **Tactical Intelligence** | Unified session analytics, monster intelligence, targeting history, resources, routes |
| **Containers** | Event-driven BFS, O(1) operations, generation tracking, reconnect recovery coordinator, multi-level readiness, quiver management 🎒 |
| **Follow Player** | Party hunt — stays near leader while attacking |
| **Extras** | Anti-RS, alarms, equipment swap, combo system, push max |

## Adaptive Intelligence

nExBot shares combat and navigation context through one bounded intelligence runtime:

- TargetBot evaluates candidates through deterministic proposal arbitration and a hard safety envelope.
- Dynamic Lure, Pull, and wave avoidance use explicit state machines.
- CaveBot preserves route intent across combat pauses, path failures, and recovery.
- Twelve local models learn in `SHADOW` mode without changing actions.
- Replay, calibration, resource tracking, learned navigation costs, and Bot Doctor diagnostics use bounded storage.
- Adaptive tick rates reduce background work while combat and safety paths keep their priority.

Open **nExBot Tactical Intelligence** from the Main tab to inspect lifecycle, targeting, routes, models, replay, resources, and diagnostics.

## Architecture

```
Expand All @@ -37,17 +67,23 @@ Install paths:
├── EventBus (event-driven communication)
├── UnifiedTick (single 50ms master timer)
├── UnifiedStorage (per-character JSON persistence)
├── Adaptive Intelligence
│ ├── immutable world snapshot + feature pipeline
│ ├── proposal arbitration + hard safety envelope
│ ├── bounded SHADOW models, replay, calibration, and diagnostics
│ └── adaptive tick and optional-work budgets
├── Containers 🎒
│ ├── identity (physical container identity)
│ ├── identity (physical container identity — generation+path+slot+type)
│ ├── queue (head/tail FIFO, O(1) dequeue)
│ ├── state_machine (13 states, generation tracking)
│ ├── registry (O(1) lookups, incremental item index)
│ ├── bfs (event-driven traversal)
│ ├── scheduler (UnifiedTick integration)
│ ├── readiness (derived snapshots)
│ ├── quiver (paladin ownership)
│ └── discovery (orchestrator)
│ ├── state_machine (23 states, generation tracking, transition log)
│ ├── registry (O(1) lookups, slot-level item index, role assignments)
│ ├── bfs (event-driven traversal, retry counting, deduplication)
│ ├── scheduler (priority queue, ack timeout, exhaustion backoff)
│ ├── readiness (10-level derived snapshots)
│ ├── client_adapter (OTClient/vBot abstraction)
│ ├── quiver (paladin ownership, fixed slot detection)
│ └── discovery (orchestrator + reconnect recovery coordinator)
├── HealBot ←── player:health events
│ └── spell_resolver (conversion functions)
Expand All @@ -57,10 +93,7 @@ Install paths:
├── CaveBot ←─── 250ms waypoint engine
├── TargetBot ←─ creature events + Monster AI
│ ├── AttackStateMachine (sole attack issuer)
│ ├── Monster Insights (12 AI modules)
│ └── MovementCoordinator (intent voting)
└── Hunt Analyzer ←─ passive analytics
│ └── Tactical Intelligence ←─ unified analytics + learning
```

## Documentation
Expand All @@ -71,13 +104,14 @@ Install paths:
| [HealBot](docs/HEALBOT.md) | Healing spells, potions, conditions |
| [AttackBot](docs/ATTACKBOT.md) | Attack spells, runes, AoE optimization |
| [CaveBot](docs/CAVEBOT.md) | Navigation, waypoints, supply management |
| [TargetBot](docs/TARGETBOT.md) | Combat AI, Monster Insights, movement |
| [TargetBot](docs/TARGETBOT.md) | Combat AI, Tactical Intelligence, movement |
| [Follow Player](docs/FOLLOW.md) | Party hunt companion |
| [Containers](docs/CONTAINERS.md) | Container management, quiver system |
| [Hunt Analyzer](docs/SMARTHUNT.md) | Session analytics |
| [Tactical Intelligence](docs/INTELLIGENCE.md) | Unified analytics, learning, diagnostics, UI |
| [Extras](docs/EXTRAS.md) | Safety, equipment, utilities |
| [Architecture](docs/ARCHITECTURE.md) | Technical design |
| [Performance](docs/PERFORMANCE.md) | Optimization and tuning |
| [Adaptive Intelligence](docs/INTELLIGENCE.md) | Arbitration, learning, replay, diagnostics, and UI |
| [FAQ](docs/FAQ.md) | Troubleshooting |

## Contributing
Expand Down
Loading