Yes, We Can!
I’ve studied artificial intelligence since its early developments in 2023. Last year, I applied AI to my legal profession, developing tools to summarize and analyze legal documents. Valuable work. I think I’m one of the few lawyers in the Netherlands who is also an advanced prompt engineer.
I’m also one of the few lawyers who paints tin soldiers and rolls dice. Not totally unrelated, though—lawyers and wargamers love rules, and both fight each other to the death 😊.
Last month, I decided to combine my AI/ChatGPT-prompting skills with my wargaming obsession by designing an AI opponent. This is part two of my blog, where I describe how I finalized my prompt and the first test results.
How I Prompted
To build an AI opponent, I converted the Adjutant Introuvable rules into a structured ChatGPT prompt. This system, available on Wargame Vault, provides a logical workflow using dice tables to dictate strategy, setup, and tactical decisions. It’s system-agnostic: a dice table with modifiers determines how the AI opponent acts, while the human player translates those actions into their own game system.
I automated the dice tables into an 18-page ChatGPT prompt that includes all original modifiers and additional refinements. Here’s how my (paid version 4o) ChatGPT-prompt works:
Step 1: Player Inputs for Battlefield Setup
The player defines battlefield parameters—terrain layout (manual or random), terrain types (hills, plains, woods, rivers), and strategic objectives. Introuvable’s terrain interaction rules are included, ensuring the AI understands how roads, obstacles, and mixed-terrain zones affect play.
Step 2: Battlefield Map & Narrative Immersion
The AI generates a structured battlefield map divided into Left, Center, and Right sectors, each defined by specific terrain. Additionally, I added a narrative Memoir ‘44-style battlefield description from a soldier’s perspective, enhancing immersion.
Step 3: AI Strategy Selection
Following Introuvable’s rules, I programmed the AI to select and score three potential strategies based on terrain, objectives, and movement. The process includes:
- Randomized Strategy Selection – AI selects and ranks three possible strategies (e.g., Equal Attack, Flank Attack, Ambush).
- Terrain-Based Scoring – AI evaluates how well each strategy aligns with the battlefield.
- Objective & Tactical Modifiers – Roads, obstacles, and objectives adjust tactical priorities.
- Random Factor for Unpredictability – A dice-based element ensures AI behavior isn’t completely predictable.
- Final Strategy Determination – The highest-scoring strategy is selected, ensuring logical AI decisions.
Step 4: Force Allocation & Tactical Decision-Making
The AI assigns unit types (Regular, Fast, Support, Elite) to battlefield roles (Advance, Hold, Ambush) based on strategic priorities. During gameplay, decisions dynamically adapt based on dice-driven probability tables.
For example:
- Units in sector C2: Engage (Steady movement, initiate combat if success >50% probability).
- Units in sector R2: Probe (Cautious advance, engage only if success >75% probability).
The AI queries the player about battlefield conditions, movement rates, terrain effects, and shooting distances. In theory, one could upload specific wargame rules for dynamic AI interpretation—I plan to test this further.
Step 5: AI Command Personalities & Tactical Interaction
I introduced an AI Commander-in-Chief (CIC) with distinct personalities (Bold, Cautious, Reactive, etc.), influencing AI decision-making. Subcommanders provide tactical insights, guiding CIC choices and occasional dice rerolls. The solo player can discuss battlefield options with these AI officers.
CIC Reroll Mechanics:
The AI CIC can reroll key dice results based on battlefield events or subcommander advice, adding a layer of decision-making without overriding core dice mechanics. I’m still experimenting with how many rerolls the AI should have.
Step 6: Thematic Interaction & Immersion
To enhance realism, the AI incorporates historical military quotes and commander discussions. The CIC holds staff meetings, where subcommanders offer insights, creating a richer, more human-like wargaming experience.
Example Interaction:
CIC (Bold): “Our left flank is faltering. Gentlemen, your assessment?”
Cautious Subcommander: “Sir, we must hold and reinforce immediately.”
Bold Subcommander: “No—strike decisively now! They’re vulnerable!”
The CIC evaluates advice, possibly rerolling key results or committing reserves based on battlefield conditions. This maintains a structured decision-making process while simulating historical battlefield discussions.
Provisional Results
I tested the AI opponent with a simulated Battle of Barrosa (1811). The AI converted the historical Order of Battle into an AI-controlled setup, following Introuvable’s strategy selection and tactical decision-making rules. The generals explained their plans, and the AI managed both the Allied and French forces logically.
Simulated Turns
TURN 1 – Allied Movement
1️⃣ AI CIC Graham Evaluates Strategy Execution
- “We move forward cautiously, but the French are holding strong on their right flank. Our main attack must not stall.”
- No reroll used this turn.
2️⃣ AI Tactical Execution Roll (Oblique Right Attack)
- Left Flank: Probe → Advance cautiously, stay in cover.
- Center: Engage → Move steadily, prepare for action.
- Right Flank: Charge → Move aggressively toward R3 objective.
3️⃣ AI Movement
- Skirmishers move into cover. Muskets advance 4cm.
- Line infantry moves 8cm forward. Artillery limbers up to move.
- Cavalry moves 16cm towards R3. Infantry advances.
4️⃣ AI Shooting
- Skirmishers on the Left Flank fire at French positions → Minor disruption.
- Artillery moves, so no fire this turn.
- No enemy in musket range yet.
5️⃣ AI Reserve Activation Roll (D6 = 3) → Not activated
- Reserve follows main attack at one turn’s movement distance.
TURN 1 – French Response
1️⃣ Victor Evaluates the Allied Move
- “They’re hitting us hard on the right. Reserves must be ready if this sector falters. Hold the center and let them bleed.”
Staff Discussion Example – Chaired by General Graham
📍 Location: Allied Headquarters, slightly behind the front lines. 📍 Time: After Turn 2.
🎖️ General Graham (Commander-in-Chief – Bold, Rational, Directive) Sitting at the center of the briefing table, Graham leans forward, scanning the field reports and casualty figures. His gaze shifts from one commander to the next.
“Gentlemen, our Oblique Right Attack is in motion. We’ve made gains on the right flank, but the French Center is holding stronger than expected. Their artillery is doing damage, and their cavalry remains a threat.
Lieutenant-General of the Right Flank, what’s your assessment?”
🎖️ Brigadier of the Right Flank (Aggressive, Tactical, Focused) “Sir, our cavalry charge disrupted their skirmishers at R3. That’s a success. But the French infantry in R3 is still intact—if they regroup, we might have a counterattack.
My suggestion: We press the attack hard before they recover. Move in our infantry to lock them in melee, while our cavalry loops around and cuts off their retreat.”
🎖️ Colonel of the Center (Cautious, Defensive, Analytical) “The French Center is intact. Their artillery and infantry have taken minimal losses. Advancing without softening them up first would be risky.
I propose an artillery bombardment to weaken their morale before committing to a push.”
🎖️ Major of the Left Flank (Cautious, Stubborn, Concerned) “The French Left is advancing. If we ignore them completely, we might get flanked.
My suggestion: Do not strip the Left Flank of units for the attack. If anything, we reinforce slightly.”
🎖️ Graham’s Final Decision: ✅ Right Flank: Continue the push. Infantry will engage at R3, cavalry will flank. ✅ Center: Artillery bombardment before advancing. ✅ Left Flank: Hold firm. 🔄 No reserves committed this turn.
“You have your orders. Execute them. Dismissed.”
Next Step: A Solo Wargame
Impressive, isn’t it?
The AI opponent functions logically, though I need further testing with simple wargame rules. Will it hold up in a full solo game? Time to find out.
