AI:HughAI: Difference between revisions

From Spring
Jump to navigationJump to search
added link to
Wrote it more from the poitn of view of a user than a developer
Line 1: Line 1:
== What is HughAI ==
HughAI is a Java port of CSAI2, which was a partially refactored version of [[AI:CSAI]], a fast rush AI, written in C#, by Hugh Perkins.
HughAI is a Java port of CSAI2, which was a partially refactored version of [[AI:CSAI]], a fast rush AI, written in C#, by Hugh Perkins.


It is not quite ready for use as a fun interesting opponent in a real game, but it could be fun to play with by developers. It includes a bunch of classes for deriving maps, such as slope maps, movement area maps, and los maps, from the data made available to the AI.
== To install ==
 
To install
 
Make sure you have hoijui's Java Interface v0.1 installed. I believe this is installed automatically if you have Windows. Other platforms may have varying mileage.
 
Once you have Java Interface 0.1 installed ok:
 
1. Download HughAI from:
 
http://manageddreams.com/hughai/HughAI.tar.bz2
 
2. untar (using Winzip or your favorite zip utility) into AI/Skirmish, so you should have the following directory structure:


It contains a GUI written in Swing, to which classes can subscribe, registering the name of a button, and a handler method to be called.
AI/
Skirmish/
HughAI/
0.1/
SkirmishAI.jar
... other files ...


Similarly, chat commands can be registered by the AI classes.
3. Run springlobby, create a single-player game, and do "add-bot"


More details on the architecture can be found in the file src-ai/architecture.txt, in the sources:
Note that the AI needs to be playing as Arm, and on Balanced Annihilation. On anything else, it will probably just sit there and do nothing :-D
 
It's fairly early days yet, so don't expect too much just yet ;-) I'll update this message as it gets better.
 
== Mods and maps ==
 
It only really works with Balanced Annihilation, unless you start to tweak the config files.
 
== Play-style ==
 
It's a non-cheating AI.  It sends out scouts to locate the enemy.  It attacks with a pack of units, and withdraws them if too many die.  That's it for now ;-)  It did ok in its C# form.  It's currently undergoing quite a lot of mutation, and it's becoming quite configurable, so it's early days yet.
 
== Configuration ==
 
There is a per-mod configuration file in the AI directory, with a version postfix, currently _2, ie:
 
BA_2.xml
 
This can be used to tweak the names of certain default and basic units.
 
There are also a number of workflow xml files in the BA_workflows subdirectory.  Currently, only one of the workflows are used, so there's no point in adding more than one for now ;-)  In the future, it might simply randomly select from one, at random, so a human enemy doesn't know if the AI will tech or rush or whatever.  Sounds reasonable?
 
The workflow config files define what will get built essentially, with a priority, a unitname, and a quantity.
 
The higher the priority, the earlier the units will be built.
 
You can add in the same unit on multiple lines, with different priorities, so you can say: ok, first build a couple of stumpies, then a jeffy, then some more stumpies, or whatever.
 
== Limitations /ways to beat it ==
 
Currently, no threatmap, so just dump some really powerful defense in its way, and it'll obsessively throw itself against it.


http://github.com/hughperkins/HughAI/blob/f23bf8cb4353d5577599f0c531474d36342fba11/src-ai/architecture.txt
== Soure-code ==


The sources are available from the following git repository:
The sources are available from the following git repository:


git://github.com/hughperkins/HughAI.git
git://github.com/hughperkins/HughAI.git
http://github.com/hughperkins/HughAI/tree/master


Web browser page:
More details on the architecture can be found in the file src-ai/architecture.txt, in the sources:


http://github.com/hughperkins/HughAI/tree/master
http://github.com/hughperkins/HughAI/blob/f23bf8cb4353d5577599f0c531474d36342fba11/src-ai/architecture.txt
 
The AI uses hoijui's Java Interface v0.1.

Revision as of 11:59, 7 September 2009

What is HughAI

HughAI is a Java port of CSAI2, which was a partially refactored version of AI:CSAI, a fast rush AI, written in C#, by Hugh Perkins.

To install

To install

Make sure you have hoijui's Java Interface v0.1 installed. I believe this is installed automatically if you have Windows. Other platforms may have varying mileage.

Once you have Java Interface 0.1 installed ok:

1. Download HughAI from:

http://manageddreams.com/hughai/HughAI.tar.bz2

2. untar (using Winzip or your favorite zip utility) into AI/Skirmish, so you should have the following directory structure:

AI/ Skirmish/ HughAI/ 0.1/ SkirmishAI.jar ... other files ...

3. Run springlobby, create a single-player game, and do "add-bot"

Note that the AI needs to be playing as Arm, and on Balanced Annihilation. On anything else, it will probably just sit there and do nothing :-D

It's fairly early days yet, so don't expect too much just yet ;-) I'll update this message as it gets better.

Mods and maps

It only really works with Balanced Annihilation, unless you start to tweak the config files.

Play-style

It's a non-cheating AI. It sends out scouts to locate the enemy. It attacks with a pack of units, and withdraws them if too many die. That's it for now ;-) It did ok in its C# form. It's currently undergoing quite a lot of mutation, and it's becoming quite configurable, so it's early days yet.

Configuration

There is a per-mod configuration file in the AI directory, with a version postfix, currently _2, ie:

BA_2.xml

This can be used to tweak the names of certain default and basic units.

There are also a number of workflow xml files in the BA_workflows subdirectory. Currently, only one of the workflows are used, so there's no point in adding more than one for now ;-) In the future, it might simply randomly select from one, at random, so a human enemy doesn't know if the AI will tech or rush or whatever. Sounds reasonable?

The workflow config files define what will get built essentially, with a priority, a unitname, and a quantity.

The higher the priority, the earlier the units will be built.

You can add in the same unit on multiple lines, with different priorities, so you can say: ok, first build a couple of stumpies, then a jeffy, then some more stumpies, or whatever.

Limitations /ways to beat it

Currently, no threatmap, so just dump some really powerful defense in its way, and it'll obsessively throw itself against it.

Soure-code

The sources are available from the following git repository:

git://github.com/hughperkins/HughAI.git http://github.com/hughperkins/HughAI/tree/master

More details on the architecture can be found in the file src-ai/architecture.txt, in the sources:

http://github.com/hughperkins/HughAI/blob/f23bf8cb4353d5577599f0c531474d36342fba11/src-ai/architecture.txt