(non)SASL input needed

GJK

Member
Joined
Mar 27, 2003
Messages
1,278
Reaction score
36
Location
ATX
Country
llUnited States
Hi all,

I'm thinking about writing a program for use with playing ASL alone, to control enemy behavior, but one that can be used with any scenario available - so not a SASL replacement. I'm primarily designing this as a learning aid to myself so that I can hash out new rules sections alone and quickly, with possible unexpected behavior by the "AI". That's the key part. I can play against myself, but to have an "AI" take semi-control might be a nice feature.

Here's the basic idea that I have at this point:

The AI has an Agression Level (AL) at start, a number between 0-50. This number will start at 50 before the scenario is begun, but will be adjusted immediately depending on the scenario's parameters; will the AI be attacking or defending, is it a meeting engagement, is the AI expected to exit forces, etc. The AL will continue to adjust each turn depending on results from the previous turn. The lower the AL, the more passive the AI will be. For example (in extreme cases) an AL of zero (0) would result in the AI moving not at all or very little, seeking to gain concealment and not prep firing and only DF if fired upon first. A level of 100 would call for the AI to move in erratic ways in any attempt to reach a VL or to exit the board (as applicable). Even if it means FFMO/FFNAM in the LOS of you (it's enemy). It will also seek to HW (if applicable) and to advance into your location. These are the extreme values, everything in between would be included. Results would also randomly apply to the AI squads- you first input how many squads that he has and by unit ID a unit is determined to perform an action should a set of cases apply.

Some examples that I'm thinking would lower or raise the AL might be:

Lower AL:
- loss of squad, broken squad, loss of leader, pins, SW malfunction/destruction, ratio of KEU to AI units.

Raise AL:
- enemy KIA, MC, Pin results inflicted
- capture of VL (or proximity to a VL)
- advantage in KEU to AI units (per squad basis)

So, at the beginning of a turn, the adjusted AL will determine how to play the AI's units, on a per squad basis matched against a set of circumstances yet to be determined.

Now, perhaps I'm reinventing the wheel, if so, I'm sure someone will point me to something similar that already exists. SASL sounds great, but since I'm just getting back into ASL, I'm taking it a step at a time, so SASL is on hold for the moment.

Maybe this will work, maybe not, but any input, suggestions, criticism, etc welcomed!
 

GJK

Member
Joined
Mar 27, 2003
Messages
1,278
Reaction score
36
Location
ATX
Country
llUnited States
AdrianE said:
Gary

You really should talk to the development team behind JASL. They have been building a Java based ASL software where the human plays against the AI.

Lars Thuring is the primary on the project.

Check out:
http://www.thuring.com/asl/jasl/index.html
Thanks Adrian. In fact, I'm actually working to help beta test JASL and have spoken with Lars directly a number of times, though not related to my project. I may just pick his brain for the algorythm's that he uses to conduct his AI's actions - great idea.
 

Dr Zaius

Chief Defender of the Faith
Joined
May 1, 2001
Messages
8,902
Reaction score
408
Location
The Forbidden Zone
First name
Don
Country
llUnited States
Why not team up with Lars and help him improve the AI? I believe his goal is pretty much what you are saying, but it's a complicated one and may never be fully realized.

The problem with attempting to port ASL to a PC is the sheer number of options a player has. Many wargames have more complicated math that goes on behind-the-scenes for hit and damage determination, but ASL has a huge number of rules exceptions and small details that would be problematic for a programmer. The thing that makes it the hardest is the victory conditions. Most of the really good wargames (both board and PC) have a fair number of victory condition "types" that can be mixed-matched for a given scenario. In ASL the victory conditions virtually have no limit! They are bound only by the scenario author's imagination and skill. Implementing all the different possible types and combinations would be a significant task for a skilled programmer unto itself.

Could a really talented group of programmers port ASL directly to PC format and bless it with a truly competant AI? Yes, although the AI would probably be fairly predictable and relatively clumsy. It could be done . . . but I think it would take a group a fairly dedicated and skilled people to pull it off. Just ask MajorH how difficult this is. TacOps is one of the most complicated wargames ever and he has been working full time on it for over 15 years--with support and funding from the US, Canadian, and Australian governments. What you're talking about is no small task and would be similar to programming TacOps from scratch. I am not a programmer myself, but I would urge you to talk to Lars and get him to put a team together.
 

GJK

Member
Joined
Mar 27, 2003
Messages
1,278
Reaction score
36
Location
ATX
Country
llUnited States
Thanks Don, but perhaps I wasn't clear. I'm not looking to port ASL to the computer, I'm just using the computer to return to me a set of [suggested] actions for the other side when I play on the tabletop. So the idea behind my simple little program is to allow me to use it with any existing or yet to be developed scenario. When I play both sides vs myself, instead of going into "other side mode" and pretending that I'm semi-oblivious to what I just did for the previous side, I will now have a program that will help guide me in the couse of actions to use for the "bad guys". I hope that makes sense. :nuts:

So, what I'm looking for are the factors that would influence the aggression level of the OpFor during the course of a (brief) battle. Friendly losses, enemy losses, control of an area or VL, etc. The big thing is to make the OpFor unpredictable, instead of me having full control of both sides, the OpFor will be influenced by the circumstances and may behave rationally or irrationally.

My thinking is that the more I'm beating the OpFor, the lower it's AL will become (possibly) and how I am to then play that side will be guided by what my program spits out. And vice-versa should I be putting a whoopin' on myself. :D
 

Tompy

Member
Joined
May 9, 2003
Messages
211
Reaction score
0
Location
IL
Country
llUnited States
If you wanted to use a computer to enhance solitaire play of regular scenarios, then use it to randomize things.

Teaching a computer how to play ASL is nearly impossible. This agression factor seems to be your end result and yet I see it as a simple factor. This is a game and requires some tricks of the rules, etc. Unless you know all the nuances of said tricks and every type of play it would impossible to define, let alone implement as software.

The way to help would be a way for the computer to randomize how defenses are set up. One example is to give it many places for a HIP AT Gun and the locations for when it will fire. Then punch in your moves and wallah! AT Gun coming on line as a surprise. Another example would be to identify various avenues of approach and let the software randomly utilize one of many options after you make your steup.

Just my $.02

Later,
Jeff
 

GJK

Member
Joined
Mar 27, 2003
Messages
1,278
Reaction score
36
Location
ATX
Country
llUnited States
I guess I'll need to put a beta together and let you all see it to convey the idea. It will be a web-based app. by the way, so no software to install.

The program wont tell me where to play units, only suggest how to play certain squads randomly selected based off how aggressive or passive that they are - which will be based off of casualties that they've taken, VL's, and other factors (the 'other factors' is the suggestions that I'm looking for).

So, for example, after a turn where the OpFor KIA one of my squads, a leader and break another squad, it's AL may go up using a formula:
current AL +/- 10% + 15pts Sqd KIA + 20pts Ldr KIA + 5pts Sqd breaking. Say that takes them to an AL level of 89%, quite aggressive now. I'm then instructed that for this turn, their gameplay should be along the lines of:
-Will prep fire where a target exists and a minimum FP of 8 can be reached. Otherwise, will not prep fire.
-Up to x (random number) of squads will attempt to close with and engage in CC -if- the following conditions exist:
-condition 1
-condition 2
-Remaining units should attempt to close on the objective building using the shortest route possible, but will not move in the open in front of KEU's.

So, I'm playing both sides, I just have a randomly generated set of guidelines on how to play the "other" side. It may do something stupid, it may actually play half-way decently, but the actual choice on where and what they do is up to me - in accordance with those guidelines.
 

nicotum

Member
Joined
Aug 9, 2004
Messages
194
Reaction score
2
Location
Venice, Italy
Country
llItaly
Hi, sorry for my english.

I thought about a similar project time ago.
I think that implementing a complex AI for an "electronic ASL" would be a huge investment of time.

A solution could be to create a meta-language for the AI.
Every scenario would be directed by scripts with these meta-commands inside.

The language would permit to define a way to attack/defend.

Example:
if (EnemyWithin(Hex(X8), 10)
__if EnemyLOS(Path(Group(A)), Hex(X8))
____Move(Group(A), HEX(X8), "CAUTIOUS|HS_FIRST")
__else
____Move(Group(A), HEX(X8))
__endif
endif

Not that this would be a simple task, but much simpler than teach the AI to learn playing ASL :rolleyes:
 

Tompy

Member
Joined
May 9, 2003
Messages
211
Reaction score
0
Location
IL
Country
llUnited States
I guess my question is this: What does aggressive mean? In one scenario complete aggression and complete passivity might be the exact same things. One scenario's outcome of events may call for aggression and in another the same events might call for passivity. The whole passive aggressive thing is more based on the scenario and VC and many other things not on isolated results.

You may as well just set up a scenario then come up with a number of different plans, some agressive, some passive and then roll to see which one to implement. You could create break points within the plan with branches or other conditionals. But each would need to be based on a specific scenario.

If you decided to create a beta version or at least some basic use cases that may help explain what I'm missing.

I like the meta-language idea. That is pretty cool.

It would be cool for two people to create a meta-program for each side and then run them against each other... Oh that's what Combat Mission is for.

Later,
Jeff
 

sturmovik

Member
Joined
Jul 21, 2003
Messages
42
Reaction score
0
Location
Toulouse, France
Country
llFrance
Maybe the program could just give out orders for the turn a bit like in the TCS serie of The Gamers.
Things like:

- Attack closest building agressively
- defend to death
- cautious advance
etc...

if each type of orders is described and gives the spirit of the action then it would be up to the player to play it on the board in the best way.

Those orders could be done for each "combat group" that make up the entire ennemy forces. The real difficulty is to find a way to feed the computer with the data describing the situation while keeping it simple and quick for the player.
 
Last edited:

nicotum

Member
Joined
Aug 9, 2004
Messages
194
Reaction score
2
Location
Venice, Italy
Country
llItaly
The meta language concept is in some way derived from the old c-robots idea (btw, I did develop "A-Robots" 10 years ago).

The whole passive aggressive thing is more based on the scenario and VC and many other things not on isolated results.
Sure, ASL is "details" so a generic AI is not sufficient.

But the basic engine could run with standard behaviors built-in.
So, AGGRESSIVE may be a simple definition of the '8' value on a 1-10 scale, 'COWARD' could be 2 and 'SUICIDE' could be 10.

Then you could use the generic beahvior, setting this scale to the desiderd value or writing your own beahvior.. the one that will respect your way to play.

You should be able to define your teams:
example:
CreateTeam('Left', '447,447,477,LMG,8-0')
CreateTeam('Right', '447,447,MMG,9-1')
CreateTeam('MortarTeam', '237,Mtr50')

You should also be able to define your entry points and advancing paths, the caution used by your teams, if your squads should make use of smoke whenever possible and so on.

In short, the engine shouldn't know how to play ASL, but try to play the way you teach him.
 

altrent

Recruit
Joined
Sep 12, 2004
Messages
5
Reaction score
0
Location
VA, Dulles
Country
llUnited States
Hi,

I have about the same project since some time now, and is using it as a way to learn ASL and discover what's possible with AI.
It's very much in vaporware state, but my aim would to be develop an AI that learns from his play, nothing like scripted game (most PC games) or brute force (most Chess programs).
I have not yet found a good way to store 'experience' for latter play. One possible way is that I could use an influence map (positive values for friendly controlled hex, negative values for ennemy controlled hex) to tell the AI its bad to run in Open Ground next to ennemy units. Still it would have to be scenario independant, thus map independant.
My strategy would be to divide the troups on board into smaller groups, and give of of those some goals (with intermediate goals). These goals (implemented as Course of Actions) could interract with each other, and adapt depending on the facing player. Those groups should also be able to independly take the decision to fire or not, to move or not, etc...
Those are just some random ideas, but one day I hope to be able to put those into code, and why not having a challenging AI. :nuts:

Yannick
 
Top