Campaign Series: Vietnam | A Tale of Two Auto Playtests

This post will tell the tale of two automated AI vs. AI playtests of the Campaign Series: Vietnam VN_600325_Vinh_An scenario, the first with the LAI/SAI (Legacy AI, Scripted AI) working in tandem, the second employing the LAI only (no scripting).

In the historical battle of Vinh An (from the scenario briefing notes):

Early in 1960, Viet Cong activities had become more prevalent in the Mekong Delta region. It was commonplace for the ARVN military to conduct road clearing and sweeping operations in hopes of catching the Viet Cong in the open. Road sweeping operations typically meant clearing mines and roadblocks for supply traffic to move freely from district to another. While these were standard affairs, one such operation culminated into a full scale ambush by the newly created Viet Cong U Minh Main Force battalion. This battalion would be the bane of the ARVN divisions operating in the area for years to come. In this case, it is the 2nd Battalion, 31st Infantry Regiment, 21st ARVN Division that would have their teething experience on QL 12 during a road clearing and sweeping operation.

In short, this scenario is thus a basic convoy ambush type scenario.

In the screenshot following:

Campaign Series Vietnam | AI vs. AI Playtest

  • The VC 1st Coy lies in wait in the vicinity of Vinh An.
  • The VC 2nd Coy is directed to sit tight, then attack Xom Ben Luong if and when fighting erupts around Vinh An.
  • The VC 3rd Coy is set to ambush any ARVN forces moving northwards up Highway 12.
  • The ARVN 2 Coy, the road clearing convoy, is ordered to move northward up Highway 12, and clear any mines or roadblocks in its path, then veer eastward to Vinh An. Meanwhile, the mine clearing engineers are to continue up the road northward, eventually as far as Xom Ban Oi.
  • Beginning at Turn 5 (or possibly sooner, if the ARVN 2 Coy is attacked), the ARVN 1st Coy is directed to load onto trucks, then motor up Highway 12 as far as Xom Ben Luong, also with the mission to clear any mines or roadblocks discovered along the way.
  • Beginning at Turn 5 (or possibly sooner), the ARVN Weapons Coy is to load onto trucks, then proceed up along the left river bank as far northward as Kinh Song Trem Trem, there to provide fire support for ARVN 1st Coy. (Moving anywhere beyond that point is too slow going.)With the SAI/LAI working in tandem, how did the first playtest play out? Let’s see (the situation at the end of Turn 13):

Campaign Series Vietnam | AI vs. AI Playtest

  • The ARVN 2nd Coy and VC 1st Coy are fighting to control Vinh An. The mine clearing engineers (with engineer trucks close behind them) continue on their primary mission.
  • The VC 2nd Coy has taken Xom Ban Luong. If the fight for Vinh An goes too badly, the VC 2nd Coy is directed to help out the VC 1st Coy in that fight.
  • After hitting a minefield along Highway 12 just beyond Xom Chac Bang, the ARVN 1st Coy was indeed ambushed by the VC 3rd Coy. The ARVN Weapons Coy assists from just across the river.
  • A second ARVN engineer company has trucked northward to, hopefully, clear the minefield just northeast of Xom Chac Bang.In other words, this scenario has pretty much developed as intended: an ambush, and a main fight around Vinh An.Hmm, I wonder what would happen if we remove the SAI (Scripted AI) and let the LAI (Legacy AI) alone play itself. Let’s find out:

Campaign Series Vietnam | AI vs. AI Playtest

  • The VC1st & 2nd Coys operate about the same as in the first autoplaytest.
  • The ARVN 2nd Coy abandons its road clearing mission and retreats back down Highway 12 to Xom Vam Chac Bang.
  • The VC 3rd Coy moves cross country northeastward and away from Highway 12. There is no ambush!
  • Leaving its trucks behind, The ARVN 1st Coy marches on foot up Highway 12 only as far Ap Vinh Dong.
  • The ARVN Weapons Coy stays put, goes nowhere.More or less the end result (also at the end of Turn 13; there is little change after that point):

Campaign Series Vietnam | AI vs. AI Playtest

  • The VC are clustered around Xom Ben Luong and Vinh An to the north.
  • The ARVN cower in fear midway along Highway 12.
  • Many ARVN lie dormant to the southwest around Kien Long.
  • Except for incidental clashes, there has been very little combat.
  • In this unscripted autoplaytest, it played out entirely unhistorically, and with near total disregard of the scenario designer’s intent.Now imagine if you the human were to play one side or the other vs. the opposing (a) SAI/LAI tandem or (b) LAI only.

Will this game’s AI be perfect? No. Will it be better than ever? We think so! 






Campaign Series Event Engine How-To

The Campaign Series Event Engine, hereinafter referred to as the CSEE, is a standard, built-in extension to the game engine giving you the ability to script special messaging and all manner of in-game events.

With the CSEE, you can for example, based on changing circumstances:

  • Show on-screen briefings, in the form of pop-up message dialogs, at game’s start, then provide hints and commentary throughout the game
  • Award positive Event Points (much like traditional Strength Points, and Objective Points) for special in-game achievements (e.g., killing an enemy commander or HQ; clearing out a map sector of all enemy units; etc.)
  • Assign negative Event Points for politically bad behavior (e.g., crossing over a border into a forbidden or demilitarized zone; ordering an airstrike on a mosque or temple; etc.)
  • Alter the value of objective hexes
  • Hasten or delay reinforcements, even change the location of entry hexes
  • Increase or decrease one side’s or the other’s general morale level
  • Raise or lower ammo levels, available air strikes, star shell (flare) count, etc
  • Change Adaptive AI parameters
  • Alter victory conditions

…and so much more.

In this How-To, I will build a CSEE .lua script, from start to finish. For our purposes, I will focus on the Jerusalem48.scn (Assault on an Ancient City) scenario, which is part of the Alan R. Arvold’s Ode to Divided Ground collection (a standard mod, included in CSME 2.0 by default).

This is no quick How-To. Inevitably, I will bog down in details. If you want to do anything more than the most trivial of CSEE Lua scripts, there is no escaping the details. A picture is worth a thousand words, they say. So too concrete examples.

This How-To will show plenty of examples, and more than a few pictures too!

Download it here:


Accompanying Lua Reference document and Jerusalem48_csee.lua files can be downloaded from here: csee_howto_reference_sample

If you have any questions just ask, either here, or at the Matrix Games CSME Forum