.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Better AI Idea - modders please read (http://forum.shrapnelgames.com/showthread.php?t=4633)

Jourin November 21st, 2001 07:47 PM

Better AI Idea - modders please read
 
Recent game I was attacked by the XiChung. I was defending warp point with only mines, but had 100+ on the warp point (If you have 99 and then lay the mines from 1 ship it is possible to get more than 100 mines in a sector). AI sent in 2 mine sweepers and then 40 ships, all were killed. I re-seeded the mine field and the AI kept sending in more ships but no more mine sweepers. I finally got bored and quite the game as it was too easy.

Looked at AI files and AI only had to build 2 mine sweepers where they need a minimum of 6 to 10 (assume mine level 2, LT CR hull {400} and following design file would put 5 to 6 mine sweepers on ship or each mine sweeper could sweep 10 to 12 mines. At mine 3 it would be 15 to 18 mines - to sweep a 100+ mine field requires 6 to 10 mine sweepers). Additionally it will build ships before mine sweepers so it kept on building ships and sending them into the minefield and never got a chance to build more mine sweepers.

Recommend:

1. Change in 'Prepare to Attack' phase the required minesweepers to 10, better more then not enough.

2. To simulate how humans will replenish losses to sustain an attack separate the 'Prepare to Attack' and 'Attack' phases into two queues. Keep 'Prepare to Attack' the same (except for adding more mine sweepers). For the new 'Attack' phase use to replenish losses. Keep it short so it cycles through. Include mine sweepers, troop transports, troops, fighters, ships (carriers, Kamikaze, space yard ships). That is 9 maybe 10 items in the queue. Having the AI build defensive bases and population transports during the attack might waste effort that would be better used to sustain the attack. Preparing to attack, attack, and securing holdings after attack are different phases and having the AI build the same for all these phases hurts the AI because a human would not do that.

3. Add a separate Defend (Long Term). My understanding is that this phase is when the AI is on the strategic defense (loosing) and not a tactical defensive pause which is Defend (Short Term). Keep the current queue for 'Prepare for Defense, Defend (Short Term)' the same. Again keep the new 'Defend (Long Term)' queue short to quickly replenish critical elements, like mines and at least two mine layers (top of the queue). Include satellites, 1 satellite layer, defensive bases, weapons platforms, troops to keep the people happy (and also for some defense), and then ships. When an AI dies it dies quickly because it doesn't build the best things for a cheap defense.

4. I understand the logic in all the queues, but I think in two critical areas, the attack phase and the defend (Long term phase) greater granularity would make a better AI. Think what you build when you are on the attack. (For me it is mine sweepers if I loose any, fighters, troops, and then ships). What do you build when you are on the strategic defense, mines, mine layer, more mines, fighters, satellites, maybe a satellite layer to seed the mine field with satellites, defensive bases, weapons platforms, more space yards, and then ships. Ships are good for a mobile defense or for rebuilding during a tactical defense, but mines and fighters are cheaper and defensive bases provide more fire power per cost then ships. I never build colonizing ships or population transports or troop transports.

The current Infrastructure and Exploration make perfect sense, but maybe separating the following phases into custom designed and smaller queues would help the AI a lot. Just my thoughts. I will experiment in a game this weekend to see if these changes make a difference. But something all the AI mod makers should consider.

tesco samoa November 21st, 2001 08:14 PM

Re: Better AI Idea - modders please read
 
I have done the adjustment in 2 PBEM games with computer players.
following is the adjustments

Not Connected 2 ships entry level(el) 5
Prepare for Defense, Defend (Short Term), Defend (Long Term)
3 ships Entry level 15
Secure Holdings After Attack, Incursion
6 ships el 8
Prepare for Attack, Attack
12 ships el 4
Infrastructure
8 ships el 6
Exploration
8 ships el 6

And I decreased the
Planet Per Item from 30 to 20.

The Ai Has no problems with mines. And AI fleets at the mid point of the game will have a minimum of 3 to 5 minesweepers.

Sometimes just decreasing the planet per item will clean up that problem with the minesweeping but.....


OverKill is prefered.



------------------
Utinam logica falsa tuam philosophiam totam suffodiant!

Master Belisarius November 21st, 2001 08:33 PM

Re: Better AI Idea - modders please read
 
Honestly I dislike the idea to require at least 10 minesweepers to the AI. Why?
Because the AI doesn't know how to use the minesweepers: the AI doesn't know that need to group them and include them into the attacking fleets...
Then, IMHO, 10 minesweepers should be a waste of resources (depend of the stage of the game).

I think that the best option (not the perfect option), is to include at least one mine-sweeper component, inside the attack ships.

vreln November 21st, 2001 08:57 PM

Re: Better AI Idea - modders please read
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Master Belisarius:
Honestly I dislike the idea to require at least 10 minesweepers to the AI. Why?
Because the AI doesn't know how to use the minesweepers: the AI doesn't know that need to group them and include them into the attacking fleets...
Then, IMHO, 10 minesweepers should be a waste of resources (depend of the stage of the game).

I think that the best option (not the perfect option), is to include at least one mine-sweeper component, inside the attack ships.
<HR></BLOCKQUOTE>

But this runs into the "Swiss Army Starship" problem -- if you build specialized components into your warships, they have less punch in battle. Having a bunch of specialized types gives you greater operational flexibility. Though for some reason it always seems like the specialist I need in a big hurry right *here* is invariably way over *there*...


------------------
Not *that* button!

Master Belisarius November 21st, 2001 09:30 PM

Re: Better AI Idea - modders please read
 
Vrlen: I can see your view. For this, still my AI races have minesweepers... But you will see that the more sucesfull AIs, have minesweepers included into their attack ships also.

Jourin: I like your idea to separate the queues. But I can see a problem: we never know in what state is the AI (well, except in the starting game, when occur the Exploration phase). And also, we never know how many time the AI will be in the same phase, and we're unable to change the AI phase (hard coded).

I had the same idea than you, when I started my first attempts to do a decent AI: I did the Attack queue with a low number of items, and removed the Colony ships from this queue. Big mistake! The AI was a loooong time without build Colony ships... and then, died very fast.

After lots and lots of hours testing SE4 AI scripts, I prefer to use looong queues.

Jourin November 21st, 2001 10:59 PM

Re: Better AI Idea - modders please read
 
Master Belisarius,

Thanks for the feedback on the states. Does anyone know the rules why an AI would go into each state? Maybe we could ask MM to publish the rules.

Since the Last patch I have seen the AI group mine sweepers, so maybe that problem is fixed. On too many mine sweepers wasting resources. Maybe 10 is too much, but 6 is the minimum. I would rather build the extra minesweepers once then build over a 100+ ships and constantly feed them into the meat grinder of a mine field. Adding mine sweeper components helps clear the minefield, but that is one less weapon, shield, or armor to help in the battle when it counts. The XiChung sent in the minesweepers first, they just didn't send in enough. If they had 8 less ships and 8 more mine sweepers (They were at mine 2 level), I would have been in trouble. 32 (orignial 40 - 8 for extra mine sweepers) ships would have broken into a system that was defended by nothing. But what happened is that my minefield, constantly being re-seeded killed over a 100+ ships. Yes they finally broke through with 16 heavily damaged crusiers to be met and destroyed by 9 destroyers. Those 9 destroyers + 6 minesweepers, then conquered the next couple of systems. I emplaced another minefield and watched as the AI again killed itself. I then quite the game. I was playing high bonus for the AI.

If separate queues are not the answer, then move the minesweepers to the top of the queue and increase to 6.

Master Belisarius November 21st, 2001 11:39 PM

Re: Better AI Idea - modders please read
 
"Since the Last patch I have seen the AI group mine sweepers"

Yes, sometimes the AI use them in "Groups". But the AI move the mine-sweepers one after one, not like a true fleet... this is a problem when try to remove a big minefield, that would be removed without loses for all the minesweepers at the same time, but not sending the minesweepers one after one.
Well, at least this was my experience, but maybe, now the AI is more smart (I hope!!!).

Also, the minesweepers never are protected by warships. For this reason, some moders have included weapons into the minesweepers designs.

I really like the description of your game. But please note that a fleet of 40 war ships with 1 minesweeper component level 3, would have removed the minefield without take loses.

I agree that the AI script must include minesweepers, but also, at least one mine-sweeper component should be included into the attack ships.

Finally, I always believed that a way to help the AI with the minefields, is using the cloak components... but sadly, a cloaked ship can't remove mines!!!! I have reported it to MM many times... and currently I'm not sure if this is a feature or a bug.

Mark Walton November 21st, 2001 11:44 PM

Re: Better AI Idea - modders please read
 
Even better than telling us the rules for state change, give us control!

Add this to my wish list:

Let us tell the AI under what circumstances to change state, and which state to change to. Let us create our own states and set any variables / actions this state requires. We could write some real, killer AIs.

I would like to be able to create my own list of variables too, and give the AI rules for reading/setting them. So they AI could count total losses to minefields, or number of colonizable worlds, or estimates on enemy strengths in systems...

DirectorTsaarx November 26th, 2001 10:12 PM

Re: Better AI Idea - modders please read
 
I've seen the AI (specifically the Xi'Chung and Ukra'Tal) do very well with minesweepers. I lost a couple of systems to each race because I couldn't replenish the minefields fast enough. Both races had dreadnought-sized (!) minesweepers that worked in pairs (I think I saw a fleet of 3 minesweepers once), and each dreadnought was capable of clearing an entire minefield by itself. Of course, they both lost a few fleets to various minefields before sweeping them, but that happens to humans sometimes too.

It is unfortunate that the minesweepers don't get placed in fleets with attack ships, but at least that way there's a chance that the attack fleet won't be destroyed by the Last few mines if the minesweepers aren't sufficient.

Atraikius November 27th, 2001 01:41 PM

Re: Better AI Idea - modders please read
 
I know I have seen the AI use actual fleets of minesweepers (happened to check on one of mine), and have seen it multiple times. I have caught the orks with a fleet of 5 dreadnaught minesweepers (5 minesweeper 4 components each) twice.

I agree on the giving us the ability of controlling AI states, that was one of my wish lists items in a previous thread. Need more than just controlling when the AI changes states, the state also seems to effect which ministers have priority over different functions, and what functions they will use; I want to be able to set those too.

Jourin November 28th, 2001 09:18 PM

Re: Better AI Idea - modders please read
 
This past weekend I ran a series of 5 test games with 10 AIs (I sometimes took control). I changed the minimum number of mine sweepers to 6 in all the AI scripts. Prior to an attack, the AI built 6 minesweepers and sent them in as a group. The six minesweepers cleared the 100 mines in usually in the first pass (depending on mine level - in one case the did not, but cleared the majority that the fleet, although depleted still made it through the minefield) and then sent in the 40 ship fleet. I could no longer depend on minefields for the AI to kill itself on. I recommend that all the modpack AI mod makers seriously consider upgrading the minimum number of minesweepers to 6. Conduct your own tests but please consider.

Other tests:
I added a separate queue for attack, but left the prepare to attack queue the same. Did not achieve the expected results. I could not find a clear distinction between attack and prepare to attack by the AI. Recommend keeping the current setup on one queue for both.

I added a separate queue for defend (long term), and in all but one case achieved the expected results. The AI consistently went into this state when it was loosing. I used this queue to have the AI build lots of mines, satellites, fighters, weapon platforms, bases, and then ships. The AI put up such a strong defense that it actually stopped me. Usually once I get the AI on the ropes, it folds, but it actually stopped me. The one case that it didn't work occurred when an Ork ship was transported by an event into Norak space and moved into the Norak home system. The Norak's went into the defend long term state for over 50 turns. Maybe since the Norak's could not attack because of no direct contact, the AI put them into the defend long term state, or maybe since the home system was "attacked", the AI went into the defend long term state. So I added a colonizer back into this queue but with a minimum of 1. The AI needs to build at least 1 colonizer so it doesn't kill itself like the Norak's by not expanding, but does not need to constantly waste resources by building colonizers that immediately get destroyed when actually in a real defensive situation. I replayed the Norak game and with the addition of the colonizer, the Norak's changed states and moved out of defend long term much sooner then 50 turns. So it played differently the second time around.

Recommend that the modpack AI makers seriously consider and test a separate queue for defend long term.

I also made a separate research queue for defend long term, so it would research defensive techs. Maybe could expand to include separate techs for infrastructure, etc. Might also help the AI.

Going to take a break from SEIV since it is the only game I have played for a year and try some Civ III, but since I still love SEIV I will be back.

Jourin November 28th, 2001 09:21 PM

Re: Better AI Idea - modders please read
 
This past weekend I ran a series of 5 test games with 10 AIs (I sometimes took control). I changed the minimum number of mine sweepers to 6 in all the AI scripts. Prior to an attack, the AI built 6 minesweepers and sent them in as a group. The six minesweepers cleared the 100 mines in usually in the first pass (depending on mine level - in one case the did not, but cleared the majority that the fleet, although depleted still made it through the minefield) and then sent in the 40 ship fleet. I could no longer depend on minefields for the AI to kill itself on. I recommend that all the modpack AI mod makers seriously consider upgrading the minimum number of minesweepers to 6. Conduct your own tests but please consider.

Other tests:
I added a separate queue for attack, but left the prepare to attack queue the same. Did not achieve the expected results. I could not find a clear distinction between attack and prepare to attack by the AI. Recommend keeping the current setup on one queue for both.

I added a separate queue for defend (long term), and in all but one case achieved the expected results. The AI consistently went into this state when it was loosing. I used this queue to have the AI build lots of mines, satellites, fighters, weapon platforms, bases, and then ships. The AI put up such a strong defense that it actually stopped me. Usually once I get the AI on the ropes, it folds, but it actually stopped me. The one case that it didn't work occurred when an Ork ship was transported by an event into Norak space and moved into the Norak home system. The Norak's went into the defend long term state for over 50 turns. Maybe since the Norak's could not attack because of no direct contact, the AI put them into the defend long term state, or maybe since the home system was "attacked", the AI went into the defend long term state. So I added a colonizer back into this queue but with a minimum of 1. The AI needs to build at least 1 colonizer so it doesn't kill itself like the Norak's by not expanding, but does not need to constantly waste resources by building colonizers that immediately get destroyed when actually in a real defensive situation. I replayed the Norak game and with the addition of the colonizer, the Norak's changed states and moved out of defend long term much sooner then 50 turns. So it played differently the second time around.

Recommend that the modpack AI makers seriously consider and test a separate queue for defend long term.

I also made a separate research queue for defend long term, so it would research defensive techs. Maybe could expand to include separate techs for infrastructure, etc. Might also help the AI.

Going to take a break from SEIV since it is the only game I have played for a year and try some Civ III, but since I still love SEIV I will be back.

Puke November 28th, 2001 10:21 PM

Re: Better AI Idea - modders please read
 
Jourin, thats is an awesome development! depending on the design of minesweeper, you can probably get away with less than 6. BCs with MS4s should probably do fine with about 3, so that might be hard to balance between the early and midgame.

I really like the long term defense idea. can you post an example of the edited files for us to check out?

Thanks!

DirectorTsaarx November 28th, 2001 10:28 PM

Re: Better AI Idea - modders please read
 
I agree with Puke: nice work Jourin.

If we can make the AI do human-like things in the different states (like researching and building defensive items when defending), we'll be closer to making a challenging AI.

I think some of the other modders have determined that the AI always needs at least one colonizer in the build queue for each state, otherwise the AI will stagnate and eventually lose.

Tampa_Gamer November 28th, 2001 11:09 PM

Re: Better AI Idea - modders please read
 
Nice job Jourin! I tried separating some of the queues a few Versions ago with my TDM races. I was having mixed results with some queues stopping altogether but I beleive this was as a result of a bug that has since been fixed sinced. I will try your suggestion this weekend. As for Civ3, I have played two games and am now waiting for the patch before my next game due to several bug frustrations (patch rumor mill has it coming out next week).

Master Belisarius November 29th, 2001 01:08 AM

Re: Better AI Idea - modders please read
 
Good work Jourin!
I'll test something about it, if some day I can get a free time!

God Emperor November 29th, 2001 02:49 AM

Re: Better AI Idea - modders please read
 
I agree with Master Belisarius. The AI cannot/doesnt make use of specialised components effectively so its best to design their ships as "Swiss Army Knives". All of my races Attack ships include at least one minesweeper component whilst Minesweeper ships include limited weapons.
If you play strategic combat, the Swiss Army Knife ships tend to perform better too...

DirectorTsaarx November 29th, 2001 10:03 PM

Re: Better AI Idea - modders please read
 
<blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Originally posted by Tampa_Gamer:
Nice job Jourin! I tried separating some of the queues a few Versions ago with my TDM races. I was having mixed results with some queues stopping altogether but I beleive this was as a result of a bug that has since been fixed sinced. I will try your suggestion this weekend.<hr></blockquote>

I'm not certain those bugs are entirely gone; one of the races in my current single-player game appears to be having trouble with construction. I need to check on that... thanks for the reminder...

edit: it's one of the stock races that's having trouble, not a TDM race.

[ 29 November 2001: Message edited by: DirectorTsaarx ]</p>

Jourin November 30th, 2001 07:06 PM

Re: Better AI Idea - modders please read
 
Thanks,

My test environment was a custom map where I paired the AIs together. The AIs, I used where Earh Alliance (me/AI) - XiChung (AI/me), Orks - Norak, Jraenar - Colonials, Krill - Sergetti, Rage - Pryrochette.

Test #1: Increased minesweepers to 6 - Did not achieve expected results. AI would build ships and not build minesweepers.
Test #2: Increased minesweepers to 6 and moved them to the top of the queue. Achieved expected results.

In test 2, the AI would discover a minefield. The AI would then send the Ready Fleet into the minefield (and be destroyed). Then it would send in the Ready minesweepers (usually just 2) and clear some mines but then be destroyed. The AI would then build the 6 minesweepers and a new attack fleet. The AI would send in the minesweepers and then the attack fleet. Not perfect but better.

Test #3: Separated the Attack and Prepare to Attack into two separate queues. Did not achieve expected results.

Test #4: Made Defend (Long Term) into separate queue. Queue was short and I will post the actual text file later. Had the AI build mines, minelayers, satillites, satillite layer, fighters, bases, weapons platforms, and ships. Cheated in the game to set up the conditions of a very weak Earth Alliance (scrapped all the ships) and then attacked with the Xichung. Earth Alliance definitely used this queue and put up a very good defense that stopped my XiChung attack. Monitored other AIs and found previously mentioned problem with Noraks.

Test #5: Added a colonizer to the queue (but only 1), and retested Noraks. After building the colinizer, they left the defend (long term) phase. My concern that I didn't test, does the AI automatically leave defend (long term) after a colinizer is built. If so, then putting instructions into the queue to build a colinizer may defeat the purpose of a separate defend (long term) queue unless colinizer is at the end of the queue and you want to trigger a transition to another state. Conversly, having no colinizer in the queue could lead to AI growth stagnation as seen with the Noraks.

After my tests I just played a normal game for about 85 turns, but discovered my strategy of just using minefields for defense while I explore and build my economy/infrastructure didn't work anymore and I (gasp) was loosing to the AI, so I did what any good human would do. I quite the game and started playing Civ3.

PS. Played at High bonus, low tech, 1 planet start and separated each AI by five systems, so they would not meet until after colinizing the second system.

Thanks for everyone's interest.

Jourin November 30th, 2001 07:08 PM

Re: Better AI Idea - modders please read
 
Thanks,

My test environment was a custom map where I paired the AIs together. The AIs, I used where Earh Alliance (me/AI) - XiChung (AI/me), Orks - Norak, Jraenar - Colonials, Krill - Sergetti, Rage - Pryrochette.

Test #1: Increased minesweepers to 6 - Did not achieve expected results. AI would build ships and not build minesweepers.
Test #2: Increased minesweepers to 6 and moved them to the top of the queue. Achieved expected results.

In test 2, the AI would discover a minefield. The AI would then send the Ready Fleet into the minefield (and be destroyed). Then it would send in the Ready minesweepers (usually just 2) and clear some mines but then be destroyed. The AI would then build the 6 minesweepers and a new attack fleet. The AI would send in the minesweepers and then the attack fleet. Not perfect but better.

Test #3: Separated the Attack and Prepare to Attack into two separate queues. Did not achieve expected results.

Test #4: Made Defend (Long Term) into separate queue. Queue was short and I will post the actual text file later. Had the AI build mines, minelayers, satillites, satillite layer, fighters, bases, weapons platforms, and ships. Cheated in the game to set up the conditions of a very weak Earth Alliance (scrapped all the ships) and then attacked with the Xichung. Earth Alliance definitely used this queue and put up a very good defense that stopped my XiChung attack. Monitored other AIs and found previously mentioned problem with Noraks.

Test #5: Added a colonizer to the queue (but only 1), and retested Noraks. After building the colinizer, they left the defend (long term) phase. My concern that I didn't test, does the AI automatically leave defend (long term) after a colinizer is built. If so, then putting instructions into the queue to build a colinizer may defeat the purpose of a separate defend (long term) queue unless colinizer is at the end of the queue and you want to trigger a transition to another state. Conversly, having no colinizer in the queue could lead to AI growth stagnation as seen with the Noraks.

After my tests I just played a normal game for about 85 turns, but discovered my strategy of just using minefields for defense while I explore and build my economy/infrastructure didn't work anymore and I (gasp) was loosing to the AI, so I did what any good human would do. I quite the game and started playing Civ3.

PS. Played at High bonus, low tech, 1 planet start and separated each AI by five systems, so they would not meet until after colinizing the second system.

Thanks for everyone's interest.

capnq December 2nd, 2001 12:19 AM

Re: Better AI Idea - modders please read
 
Jourin, most of your recent Posts are appearing twice, and I saw a triple in another thread today. You may need to be more patient waiting for the BBS to update; are you clicking "Add Reply" more than once?

Jourin December 3rd, 2001 05:10 PM

Re: Better AI Idea - modders please read
 
No I have not been hiting add reply twice. I was hitting the back button which would tell me to hit reload. Maybe that acted like another add reply.
I will try a different approach this time.


All times are GMT -4. The time now is 11:35 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.