.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Mod: SemiRandom AI (http://forum.shrapnelgames.com/showthread.php?t=41376)

Gandalf Parker November 23rd, 2008 02:45 PM

SemiRandom AI
 
Well its time for another offering from me for the lovers of chaos. Ive been playing awhile with a new program of mine.

It selects nation 77 and assigns basic units and commanders to it.
And then randomly assigns 2 more units and one commander from anything in the game (any unit, summons, or pretender).

6 heroes and 2 multi-heroes are selected from anything in the game.

Also 10 new gods are added to the nation from anything in the game. Its kindof interesting to get an insane god, or a blessable one, or one that can seduce.

This is kindof the opposite of the CBM mod. Instead of seeking balance for the players, Im seeking imbalance for the AI. Within reason of course. The initial version randomized all of the units for the nation.
Too insane even for me. :)

Gandalf Parker November 23rd, 2008 02:55 PM

Re: SemiRandom AI
 
Here is one of the god selection screens I got.
http://www.dom3minions.com/~mmdom3/SRAI_Gods1.JPG

HoneyBadger November 23rd, 2008 02:59 PM

Re: SemiRandom AI
 
That sounds great, Gandalf, and a lot of fun, but are the blessable Pretenders actually blessable? In other words, does making them sacred crash the game with the "No Holy" error?

Gandalf Parker November 23rd, 2008 03:03 PM

Re: SemiRandom AI
 
I have chosen a couple and didnt crash the game. But I didnt test the actual bless so I probably should next time.

Edit:
OK a pretender seems to stay unblessable. But he can cast bless on others and build temples.
Interesting side note, it seems as though no one can bless themselves?

Gandalf Parker November 23rd, 2008 03:38 PM

Re: SemiRandom AI
 
Ok here is a shot of a recruiting screen.
http://www.dom3minions.com/~mmdom3/SRAI_Units2.JPG

Militia, Lt Infantry, Hvy Infantry, Lt Cavalry, Hvy Cavalry, Knight, Archer, Crossbowman, SLinger, Axeman. Then two units "granted by Eris the Goddess of Chaos" which are Merman Captain @ 150 gold and Manticore @ 150 gold.

The commanders are Scout, Commander, Knight Commander, Priest, and Druid. One commander granted by Eris which is a False Horror at 240 gold. Then various mages granted by the random selection of unit-granting magic sites which means that the Druid is the only mage which can be hired outside of the capital.

I want to test how the AI creates armies when all of these are available but I wouldnt mind some tips from other people who have tested the AIs actions in order to improve them. Im also debating tossing in the Flagellants to get the AI a generic blessable unit.

Gandalf Parker November 23rd, 2008 03:44 PM

Re: SemiRandom AI
 
Heehee. Having a Mad Cultist as a god is kindof interesting. And having an Iron Dragon show up as a hero is useful.

Gregstrom November 23rd, 2008 04:54 PM

Re: SemiRandom AI
 
Do Doom Horror pretenders disappear at random, as you'd expect?
Also, when will I be able to download this?

Gandalf Parker November 23rd, 2008 05:26 PM

Re: SemiRandom AI
 
1 Attachment(s)
No. To keep things working right, all of the added units are copied to a new ID number. So they have the same features but are not the same unit.

It might be awhile before downloading. I can make some of the mods it creates available but the program is abit more difficult. For now its a yaBasic program that runs on Windows and my Linux server. Eventually I will compile it for Windows.

Here is one of the mods it made. Just unpack it into your mods directory, enable it, and then play an early era game. The new nation shows up at the end of the list.

JimMorrison November 26th, 2008 01:29 PM

Re: SemiRandom AI
 
Pretty cool!

I'd recommend removing Militia from the roster though.....

Is there any rhyme or reason to the Pretender costs and starting Dominion? The Dusk Elder at 15 is a steal, but some of the others ended up as 190-200? Also, interesting thing I noticed - a Pretender with random magic will recycle each time you select, so you can just try again until you get the picks that you want. :p

Really interesting to mess around with though. One other thing I'd recommend, is maybe adding 3 units instead of 2. I don't think that will make the strongest any stronger really, but it'll increase the odds of getting something really useful, and affordable. I really like the capital sites though, good job!

Maybe you could just generate a dozen or so of these really quickly, and we could help you test the relative viability against other randomized nations?

Gandalf Parker November 26th, 2008 04:04 PM

Re: SemiRandom AI
 
Grabbing a random number and making it a unit, commander, or pretender has its pros and cons. I cant see any of the stats.

So I noticed early on that some of the most powerful units showed up as 0 cost and 1 resource. That would not be so good to have an AI get ahold of for some major demons and summons to be ble to recruit the max number each turn. So I randomly assign a cost. I wanted it to be in line with the cost of a big surprise unit, and not low enough for the AI to fill the army with them no matter what they were. And unfortunately I cannot check to see if there already is a gold cost before changing it. So all of the added ones get a new gold cost of 40+(10 * random of 0 to 15) and commanders get a gold cost of 50+(10*random of 0 to 20)

The pretenders gold setting defines their points cost. So they get a random gold setting also. Ive been playing with those amounts.
They also get a path cost of 10*random of 0 to 7
and a dominion of 1+random of 0 to 3

I am truly math-clueless so my testing tends to be to just plug a number in and play it for abit to see if I like it. Feel free to offer up better formulas.

This program might end up splitting a number of ways.
As an addition to the SemiRand program.
Only for creating random nations for players.
Only for creating random nations for AIs.
And server-side to create a change to a MOD file.

The last one I have been testing with mixed results. I can create a series of games on my server every day such as SR_AI_xxxxxx and tell people they must have the stub.dm in their mod directory in order to play. The version they download would be about 4 lines. Just a blank placeholder so the game knows to use it. The mod can be modified at the server end to include most of what I have done. That way they can play any of the games without having to download a new mod. But only certain things work that way. I can add, delete, move around units betwen nations. But I cannot modify them. Same with the sites. So the gold-cost thing would be a problem. I might have to create an extended version which grabs the choices from files listing only the acceptable units.

Gandalf Parker November 26th, 2008 04:12 PM

Re: SemiRandom AI
 
Yes I was also pleased with how the sites came out. This is the list it selects from...

data "Bolivar's Tower of Reflections","Academy of High Magics","Animist's Hut"
data "Assassins Guild","Azure Academy","Bile Marsh","Black Tower","Library"
data "Blood Henge","Castle Arcanum","Caveman Cavern","Ebony Tower","Litter Skull"
data "Citadel of the Lore Masters","Death Mound Downs","Flower Swamp"
data "Forest of a Thousand Streams","Forest of Avendron","Grayshade Forest"
data "High Temple of the Magii","Ivory Tower","Library of Time","Mirrorlake"
data "Mirror Wall Palace","Moon Mages Circle","Moonvine Circle"
data "Navigators Guild","Poison Glades","Telesterion","The Ebony Circle"
data "Temple of the Sacred River","Temple of the Solar Bull"
data "Temple of the Turning Tide","The Crystal Academy","Whispering Woods"
data "Tower of the Golden Order","Tower of the Iron Order"
data "Tower of the Silver Order","Twice Walled Tower","Twin Spire Tower"

That was just a quick grab of some from Edi's database. I got forced that direction because I couldnt make the #startsite work with a number instead of the full name. But I like the results. Sometimes the results suck (though never quite worthless) and other times it totally kicks ASCii.
I might have to go the same route with the rest of the program. Create long lists of acceptable choices. Wide ranged but not insane. Or maybe I will export Edi's database (spreadsheet actually :( ) into a csv file and use it directly.

Stavis_L November 26th, 2008 04:36 PM

Re: SemiRandom AI
 
@JimMorrison - re: cycling to get advantageous picks, I think the point is to have the AI use this, and it presumably wouldn't do that :-)

@Gandalf Parker - Interesting idea, and looks fun. Have you considered investing a little extra time into the program's infrastructure to allow some configuration a-la SemiRandom/RanDom? Where I'm going with this is to allow randomness, but within certain ranges to prioritize synergistic combinations.

Here's a totally off the cuff configuration schema that might be a way to go (note: had to use braces vs. xml angle brackets for it to be accepted into the post...)

{units}
{unit id="727"}{!-- Jaguar warrior, likes a strong fire, water, or death blesss --}
{magicpreference type="fire" minlevel="9" /}
{magicpreference type="water" minlevel="9"/}
{magicpreference type="death" minlevel="9" /}
{!-- unit synergies are with a fast or flying, blessable unit --}
{unitsynergy type="262" /}{!-- van --}
{unitsynergy type="367" /}{!-- pegasus rider --}
{unitsynergy type="726" /}{!-- eagle warrior --}
{unitsynergy type="791" /}{!-- red guard --}
{unitsynergy type="851" /}{!-- cu sidhe --}
{/unit}
{unit id="784"}{!-- Jotun Woodsman, likes cold and a Nature or earth bless --}
{magicpreference type="nature" minlevel="4"/}
{magicpreference type="earth" minlevel="6" /}
{scalepreference type="cold" /}
{!-- unit synergies are with cold resistant unit or those that
appreciate earth or nature bless --}
{unitsynergy id="831"/}{!-- ice elemental --}
{unitsynergy id="1287"/}{!-- tempest warrior--}
{unitsynergy id="1618"/}{!-- angakok --}
{unitsynergy id="1927"/}{!-- peshti axeman --}
{unitsynergy id="2001"/}{!-- seren --}
{/unit}
{unit id="304"}{!-- devil, likes blood or fire magic, heat, no particular unit synergies --}
{magicpreference type="blood" minlevel="4"/}
{magicpreference type="fire" minlevel="4"/}
{scalepreference type="heat" /}
{/unit}
{/units}

Gandalf Parker November 26th, 2008 04:50 PM

Re: SemiRandom AI
 
Ok here is a batch of the result files so you can see how varied it is.
http://www.dom3minions.com/~mmdom3/SRAI/

And the .yab file is the program (dont laugh too hard). Its ascii and displays fine in my browser.

@Stavis_L.
The SemiRand is always on my mind. Originally there was vanilla, then my chaos stuff (maps, mods, programs all using maximum randoms). Then when people complained about it being too random there was the SemiRand project which was my original ideas but I always had too much fun with the randoms to do it. Ballbarian has done an excellent job of running with it.

Long ago I complained that a SemiRand program would do much better with a database to work off of. Now Edi has done much of that. I used to make my living programming databases but now I just dont have the attention span to carry out my initial plans for it.

I do think that it could be worked into SemiRand. Not only randomly placed logical provinces, and pre-created gods with logical scales, but toss in a few randomly created nations on numbers 77-88.

Gandalf Parker November 26th, 2008 06:02 PM

Re: SemiRandom AI
 
OK added another file to that directory. The ChaosMod is an example of where I started. WAY too wild a result even for me to play.


All times are GMT -4. The time now is 05:58 PM.

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