botWebWars/trollagent_ai
Isaac Johnson 862db5e8c3 added and tested trolls 2026-09-13 14:30:16 -05:00
..
INSTALL.md added and tested trolls 2026-09-13 14:30:16 -05:00
README.md added and tested trolls 2026-09-13 14:30:16 -05:00
bot.py added and tested trolls 2026-09-13 14:30:16 -05:00
requirements.txt added and tested trolls 2026-09-13 14:30:16 -05:00

README.md

trollagent_ai - LLM-Assisted Autonomous Troll Agent (Ollama)

trollagent_ai delegates tactical reasoning to a local or remote Ollama LLM while operating under the canonical Troll mechanics of botWebWars.


👹 Troll Rules & LLM Strategy

  • Solitary Brute: Never forms parties or alliances.
  • Troll Truce: Ignores other trolls and never battles them.
  • Predatory Focus: Relentlessly hunts and battles players and squads.
  • Healing via Sleep: When injured or navigating complex obstacle layouts, the LLM strategically chooses whether to rest and sleep (+0.1 HP regeneration per turn) or push forward to ambush players.
  • Obstacle Navigation: Evaluates available paths around mountains and forests, balancing Chebyshev distance against diagonal squeeze strength penalties.
  • No Wizard Challenges: Gary the Wizard cannot be engaged.

⚙️ Configuration & Environment Variables

Variable CLI Flag Default Description
TROLL_SERVER_URL -u, --url http://localhost:8000/api botWebWars API base endpoint
TROLL_NAME -n, --name GorgonAITroll Troll avatar name
TROLL_COLOR -c, --color #15803d Troll hex color
TROLL_STRENGTH -s, --strength 3.0 Initial troll strength
TROLL_HEALTH -H, --health 10.0 Initial health points
OLLAMA_BASE_URL --ollama-url http://192.168.1.220:11434 Ollama server URL
OLLAMA_MODEL --ollama-model gemma4:12b Ollama model identifier
--loop-delay 1.0 Turn polling loop delay (s)

🚀 Execution Example

export OLLAMA_BASE_URL="http://localhost:11434"
export OLLAMA_MODEL="gemma4:12b"

python3 trollagent_ai/bot.py \
  --name CarnageTroll \
  --color "#047857" \
  --strength 4 \
  --health 10 \
  --url http://localhost:8000/api