Removing and Naming AI Players

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing and Naming AI Players

redrum
Administrator
So I just put out the initial pre-release with Fast AI (version of Hard AI that doesn't use battle calc). I'm planning to remove Medium AI (old Moore N Able AI) in the next release.

This leaves a few questions:
1. Should we keep Easy AI around? Are there legitimate uses for it?
2. What should be names of the AI players?
- Do Nothing (AI)
- Easy (AI)
- Fast (AI)
- Hard (AI)
Reply | Threaded
Open this post in threaded view
|

Re: Removing and Naming AI Players

crazy_german
I can't think of a legitimate use for the Easy AI. It tends to do painfully bad plays, so bad that I would say isn't useful at all for newer players as a learning tool.

If anyone plans to build a map for battling against AI, the other options are much better. Fast can be used as an "Easy" mode if need be, or alternatively just giving the AI negative bonus income. Now that tripleA has quality AI it should be showcased.
Correctly crazy, disingenuously German
Reply | Threaded
Open this post in threaded view
|

Re: Removing and Naming AI Players

Zim Xero
Easy AI has always been awful, except as a simulation check, and quick debugging.  I seem to be a minority, however, in that my favorite AI is MooreNable.  To me, it is a fast and moderately capable AI... stable and relatively bugless.   What will the _AI nations now default to?  Please keep a copy of MooreNAble 'Medium' AI around as a basis for further work, in case Moore or someone else ever wants to improve it.
'thats the way it is' makes it neither desireable nor inevitable
Reply | Threaded
Open this post in threaded view
|

Re: Removing and Naming AI Players

redrum
Administrator
@crazy_german - I tend to agree and want to see if there is anyone that really wants Easy AI kept

@Zim Xero - Both Hard and Fast AI should be stable and bugless as well now. I'd be interested in knowing what maps you prefer MooreNAble AI on as to my knowledge pretty much every AI playable map Hard and Fast AI should both be better. If its speed then my goal is to eventually make Fast AI just as fast as Moore (and faster in some cases). All AIs will still have a copy in source control (git) so can always be brought back or enhanced.
Reply | Threaded
Open this post in threaded view
|

Re: Removing and Naming AI Players

Frostion
In reply to this post by redrum
Easy AI? The things that bugs about this AI are the fact that the Easy AI crashes on one of my maps (Age of Tribes, work in progress) and that the Easy AI seems to handle “island maps” like my Star Wars Galactic War map better than the Hard AI. Hard seems to go passive after a few turns. (It is probably caused by design flaws in the map, but still…). I would still say scrap the current Easy AI, and focus development on the Hard AI, who knows, Redrum might get help from another capable programmer one day!?

However, I also really think the game, just like any other game, should have an option that allows players to battle an Easy AI, an AI that does not make too calculated moves. Especial for new players or players who just never get any better. I don’t think the “just give the AI att/def bonus” is the best solution, as also this could confuse new players trying to figure out the game or trying to understand what is happening during the battle dice rolls, same goes for flat rate bonus incomes.

I know this is not a commercial game, and some people might not want noobs in their midst. TripleA seems to be more of a geeky game for players with high IQ  that would like the biggest challenge, but I think it would be wise to still keep it noob friendly. The more players, the merrier and they might attract new more capable players.

I would love to see “Easy AI”, “Medium AI”, “Hard AI”, “Does Nothing AI” and “Fast AI” (if needed). And that they were all based on the Hard AI, just made less calculating.

PS: I also think the Hard AI should be the default AI.
Reply | Threaded
Open this post in threaded view
|

Re: Removing and Naming AI Players

Veqryn
Administrator
in my mind there would be just 3 AI's:
Fast AI
Hard AI
DoesNothing AI

Fast AI and Hard AI would share the same code base, and probably be a simple boolean in the constructor of a single larger AI.

Fast AI would operate extremely quickly by:
not simulating turns or future scenarios
not using the battle calculator
not running any other expensive or time consuming operations/functions


The advantages of this approach is that there would only be one code base to maintain.
While getting rid of Easy AI would not have the biggest impact in terms of lowering the engine's complexity, getting rid of Medium AI would be a huge boon for development because that code a horrid mess of spaghetti.

Ideally with only 1 code base, any rules updates or new features would be easier to implement for the AI's.  
Redrum and others could refine the AI so that it plays literally all maps, even the crazy ones, decently well (better than either Easy AI or Medium AI ever did), and play the popular ones extremely well (which it already does, but just keeps getting better).
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: Removing and Naming AI Players

Cernel
In reply to this post by redrum
I have been very undecided, pondering and pondering and pondering wether Fast AI would make both Fodder and Moore obsolete or not.

I would suggest/request keeping around a Easy AI or, alternatively, a very basic kind of AI meant to be definitively finished (not subjected to further development) and doing only the basic things in a basic way (so, something like Moore or Fodder, but possibly more streamlined and with very simple and short coding), being lightning fast and able to run with very little RAM on even the biggest xml.

Probably a slimmed down version of Hard AI (much more slimmed than Fast AI) would be preferable, over keeping Fodder.

I believe Fast is going to mostly but not fully substitute a basic AI, for several reasons, in order of importance:

- Fast AI is a in-development AI meant to play quite well, while being very fast; thus it is likely to be further developed, while it may be good having a finished up and definitive AI around, particularly in case someone wants to make a map with some AI players as side elements of it, and wants to actually balance it, which you can't do if the AI keeps changing. For example, I'm thinking about a map with two opposing main factions and some marginal rogue players messing at the borders; or a spill over of AI controlled units, like in Total Ancient War. If the AI moving even marginal units gets better, the balance can be sensibly altered.
- For some reasons, you may want some AI players acting in a very basic/dumb way (for example, you want to make a map in which you have to deal with overhelming forces on purpose, not just because you have to do it to make the map competitive; like a peasants/orks/demons/zombies attack; might be funny). This is actually something I have wondered, relatively to some old play-against-the-AI maps we have; wether the creators did them with massive AI bonus just because there were no other ways to get competitive, or because they actually liked and wanted the fight-against-a-dumb-horde concept. Also, you may want a more random placement, like in the case of the minor clans of Feudal Japan or the AI players of Total World War (both RolfLarsson's, in which it is specified in notes Fodder is wanted). World War II wise, I think the German struggle against the Russians in Barbarossa may be better historically represented by the Russians having overhelming forces, but being assigned to a very stupid AI. A humans vs zombies fight may be on the same line of the Germans vs Russians one in 1941; or Finnish vs Russians in 1940.
- As now, Easy AI is much lighter than Fast AI, which may be relevant when applied to marginal players you don't want to lose time over (like Sweden etc. of TWW) or for maps with very big xml and/or very great map structure, especially for testing them over 10 rounds (and maybe even over 100 rounds, without having to wait forever, or maybe crashing). It also may be of some particular relevance for people on netbook or old stuff, although I don't really know.

The last point is the least important one, especially in the perspective of Fast AI further future improvements, but still not too uninportant. I've tested (at AI Pause Duration = 250) Total World War with all players assigned to AI in two different games running at the same time, one with all to "Fast AI" and the other with all to "Easy AI". Both games were running in between of 2.0 and 2.5 MB of RAM, after a bit and for a while. But when, about at the same time, Fast AI starts round 3 and Easy AI starts round 30 (!), the Fast AI game is at 2.5 RAM, while the Easy AI game is at 1.5 RAM. Of course, this can be just the computer giving priority to one or the other for no sensible reasons, since they were running at the same time (which, admittedly, is not that representative, since you normally don't run two TWW games with AI at the same time). Anyway, it seems that Easy AI can run with less RAM than Fast AI, despite having a 29 rounds history, instead of only 2.
Easy is already playing the Italian turn 1 when Fast starts doing anything in the German turn 1 Combat Move, and Easy AI has finished the first whole round, before Fast AI even starts doing the German turn 1 non combat moves! Easy AI is at the Britain turn 2 when Fast AI has just finished the German turn 1. Meaning that Easy AI does 1 whole round and a half in the time that Fast AI does the first German turn only! This is a massive speed difference, and it is going to get worse the more the game goes on. When Fast AI finally (!) finished up round 1, Easy AI is already at the Americans of round 14!!! Since when Fast is at start roung 3 Easy is at start round 30, it seems that Easy makes about 15 rounds in the time needed for Fast doing 1 round.
You can try running yourself TWW with Fast AI and Easy AI. I think you'll notice a difference.

As a matter of naming, here are my suggestions:

Hard-Prime AI
Fast-Prime AI
Basic AI
Neutral AI


Alternative silly names may be:

Champ AI
Flash AI
Dumb AI
Neutral AI

I've added the "Prime" thing to both, because Fast on itself may be misleading, as "Basic" and, of course, "Neutral", should be faster (or at least not slower) than "Fast". Thus "Fast-Prime" is meant as a faster version of the "Hard-Prime" AI. As now, Easy is much faster than Fast on heavy maps, and I don't believe we want to make Fast much faster than this, because I think it is better it keeps some good play level.

I tend to think that Fast should be like a still good AI not using the battlecalculator, and not too far away from Hard; so it shouldn't be too Fast.

Alternative silly names for Basic may be adequate. Like "Fodder", "Chump", "Noob" etc..

With this said, I would have rather suggested keeping Moore for the role, and getting rid of Fodder, but, since Veqryn said Moore coding is a crime against java, then remove Moore and keep Fodder, instead. Whatever fits better as a Basic AI, also from a code perspective.

If we are keeping Easy on a long term perspective (as I suggest), then let me point out only two things that I believe should be part of what a basic AI does:

1- Fodder should be made able to handle (in a dumb way) multiple movement units, instead of just moving anything of 1 (I think this is a basic element).
2- Fodder should be made crash-free, in case of maps with no capitals, as per this bug report I made:
http://sourceforge.net/p/triplea/bugs/1125/

Of course, as I said, an alternative version of Hard AI, much more streamlined and light than Fast AI, about on the same levels as Moore (not Fodder), but with a good coding behind, would likely be a preferable alternative to keeping Easy.

At any rate, none of the previous points are important.

On the short term, the only thing I can think of that may have a major negative impact on the TripleA community, if you remove both Easy and Medium AI, is that Hard AI is significantly slow in doing the AI players turns of Total World War (Sweden etc.), which is quite annoying, since they don't really matter (most of the times), and Easy AI allows to get over them faster. But I believe this should be adressed in the near future, as redrum is working on removing the useless delays of Fast AI, I think.

I would suggest the developers play a couple rounds of a "person vs person" live game of TWW with Fast AI and Easy AI for the AI players (Sweden etc.), before making a definitive decision on Easy AI removal, at any time in the future such a decision would be at stake, to get an idea if having to use Fast AI for marginal powers (you really want not to lose time with) would be bearable. There are a fair number of TWW players in the lobby, to play with.

Also, TWW should be updated, as it currently says in Notes:
"
Brazil, Spain, Sweden, Turkey only move and produce, but never attack.
Select Fodder AI for them.
Set AI Pause Duration to 0 to speed up AI moves(Game->AI Pause Duration-> 0 ms)
"
Which currently leaves noobs unable to know what they are supposed to do, and will really make no sense if Fodder gets removed.
As a side note, Feudal Japan has the same issue.

This, of course, depends on wether it is up to map's developers keeping updating their maps, no matter what the engine developers do, or if engine developers should take responsibility, when they change anything that cause issues on already made maps, especially if in High Quality and the creator is missing.

p.s.: I don't understand why Does Nothing has this feature of making a first placement, instead of being purely passive? What's that for? Just curious.
p.p.s.: I don't think that names like "Does Nothing" or "Passive" would be good, because it defends. I believe defending is doing something.
p.p.p.s.: Testing Fast against both Moore and Fodder underlines that, beside using the battlecalculator, Hard AI must have something much slowing it up, as Fodder and Moore are much faster and lighter than Fast. Previously, I imagined this was all due to using the battlecalculator, but now it seems that Hard is much more bulky (especially on maps like TWW), even without battlecalculations. The Moore coding may be horrible, but surely you don't feel it.
History plays dice