# Install Instructions ## Prerequisites - Python 3.8+ - Ollama installed and running with the `gemm4:12b` model downloaded. ## Setup 1. Navigate to the directory: ```bash cd botagent_ai ``` 2. Create a virtual environment (optional but recommended): ```bash python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate ``` 3. Install dependencies: ```bash pip install -r requirements.txt ``` ## Configuration The bot plays botWebWars using an Ollama model for strategy (voluntary alliances and navigation), while rule-mandated outcomes (forced battles/joins) are resolved automatically. Configure it via environment variables or CLI flags: - `OLLAMA_BASE_URL` / `--ollama-url`: Ollama instance URL (e.g., `http://192.168.1.220:11434`) - `OLLAMA_MODEL` / `--ollama-model`: The model name (default is `gemma4:12b`) - `BOT_SERVER_URL` / `-u`: botWebWars backend URL (default `http://localhost:8000/api`) - `BOT_NAME` / `-n`: Bot display name - `BOT_COLOR` / `-c`: Hex color for the bot avatar - `BOT_STRENGTH` / `-s`: Starting strength (1-10) - `BOT_HEALTH` / `-H` / `--health`: Starting health points (default: 10) Example: ```bash export OLLAMA_BASE_URL="http://192.168.1.220:11434" export OLLAMA_MODEL="gemma4:12b" python bot.py -n MyAIBot -s 5 -H 10 ``` ## Running the Bot Run the script, then start the game from the frontend UI: ```bash python bot.py ``` ## Example with local LLM ``` $ OLLAMA_BASE_URL="http://192.168.1.220:11434" python3 ./bot.py -n myAIBot -s 2 ```