Files
exercises-300-digital-dojo-…/DDApp/DDApplication/README.md
2026-04-02 00:12:02 +02:00

49 lines
2.1 KiB
Markdown

# Digital Dojo Bot Controller
This Avalonia app runs an autonomous bot for the Digital Dojo singleplayer API and visualizes both current game state and inferred enemy knowledge.
## What it does
- Starts/uses your current game session (`/api/game/{key}/create`, `/status`)
- Runs a cooldown-aware combat loop (`move`, `hit`, `shoot`, `specialattack`, `radar`, `scan`, `peek`, `dash`)
- Tries to maximize score by prioritizing fast damage actions when enemies are nearby
- Shows live stats (kills/deaths, HP, level progress, remaining time)
- Shows a local knowledge map:
- `P` = estimated player position
- `N` = nearest enemy from latest scan
- `* + .` = inferred enemy threat intensity
- Shows cooldown timers and action reasoning/logs
- Writes per-session analytics logs for post-run analysis
## Setup
Set your API key (GUID) in one of these ways:
1. Environment variable: `APIKEY`
2. User secrets (`Program` already loads user secrets)
3. Paste it directly into the UI text box before clicking **Start Bot**
## Run
```bash
dotnet run --project /home/tikaiz/RiderProjects/digitalDojo/DDApp/DDApplication/DDApplication.csproj
```
## Notes
- Position and map are inferred from your own movement + sensor calls (not an authoritative server map).
- The strategy is level-aware:
- `Default Level`: balanced combat with short escape commitments
- `Bigger Map Level`: more scouting and stronger anti-loop exploration
- `More Bots Level`: safer special-attack usage and tighter targeting
- `New Bots Level`: more ranged pressure and less chasing of teleporting targets
- The strategy is heuristic and tunable; it is designed for high kill throughput while respecting API cooldowns.
- Session logs are written to `~/.local/share/DDApplication/logs` on Linux:
- `*.events.csv` contains timestamped telemetry, decisions, and events
- `*.summary.csv` contains machine-readable summary metrics and action rates
- `latest-summary.log.csv` is a symlink that auto-points to the newest `*.summary.csv`
- `latest.log` is a symlink that auto-points to the newest `*.events.csv` session log