Page 1 of 3

James I v2.5

Posted: Sat Mar 12, 2011 2:19 pm
by St_Aquinas
Hello to aiscripters.com this is my first AI script. It has been on aokh for a few weeks, and this is its first posting here. Thanks to Campeador and JD for their help with its development so far.
Settings:

Meant for Arabia 1v1 tourney
-Arabia Map
-Small map size
-200 pop
-low resources
-Plays only Britons Civ

Current strategies
-Adaptive military
-Adaptations decided by what types of troops have been created by opponent
-Attempts flush defense
-Will try to keep pace with faster castle times by suspending troop training until castle-age is researched

I'm trying to improve the economy to allow for a faster castle time while still training a defense force during feudal. If anyone has any suggestions or links to articles that would be great. Any other suggestion are encouraged, the still has some odd behaviors and flaws.

EDIT 1:
My development efforts have been strictly on the improvement of the Random Map play, while I'm grateful for suggestions about the deathmatch play,(and I will definitely get to improving on them) Random Map is currently my main focus

Updated on 3/13/11
Version 1.7.4, fixed my military build rules now barracks, archery-ranges, stables, siege workshops, and castles are built closer to the TC. 2 villagers will explore in Dark Age if berries aren't immediately in sight. New Version contains a few other small changes.

Updated on 3/18/11
Version 1.7.4.1, fixed mistakes in BritMilitary and other files, should run without error now. Working on a fast Castle and ability to play as Mayans for next update!

Updated on 3/24/11
Version 2.0, After spending some time watching and thinking about how this script was constructed I decided it had become far more complex than necessary or is functional. Then after spending considerable time looking around at how others have written and organized their scripts, I came to a conclusion, my script needed to be totally remodeled....So may I now present version 2.0, systematically organized much like SRN, but also incorporates many ideas I saw in others use, and after a comment from suriel, without defend groups. Currently I'm working on getting fast castle up to snuff, and I've included a zip with 5 games with the new system. Any and all comments are welcome and encouraged!

Updated on 3/26/11
Version 2.1
Improved FC ability, now reachs castle age in between 18:00 to 20:30. Mayan Eagle Rush Strategy added!

Updated 7/12/11
Version 2.4
Changed defensive rules and some of the gathering/military strategies

Updated 7/14/11
Now Tournament Ready, bugs have rudimentary fixes.

Re: James I v1.7.3 My first AI

Posted: Sat Mar 12, 2011 4:11 pm
by scripter64
Welcome to the site, St Aquinas :)

Re: James I v1.7.3 My first AI

Posted: Sat Mar 12, 2011 4:43 pm
by Archon
Hi and welcome :)

A quick question: In line 69

(load "Kingship/BritMilitaryK")

is the K too much or did you miss the another version of this file? Currently the script isn't loading and you'll get an error message.

Edit: I deleted the K and the errors were gone.

There are a lot of thing to improve.

- You need (set-strategic-number sn-cap-civilian-builders 100) to build with more villagers at the same time.
-

Code: Select all

(set-strategic-number sn-maximum-town-size HCLOSE)
(build house)
(set-strategic-number sn-maximum-town-size 40))
This doesn't work. Each strategic number will be updated only once per rule pass and all previously set values are overwritten. So you you build everything at 40, thats too far.
- For low resources start it gathers too much wood at the end of dark age and doesn't build enough farms. Your script had about 1'30'' idle TC waiting for 500f to click feudal age.
- I started mining without camps, could be related to the builder cap issue above.
- It chats suspend training for fast castle age, but on the other hand it researches like mad. If you want to flush you don't train enough units and you're too slow for fast castle.

Sorry if this long list sounds rather dissapointing. Good Luck on your improvements!

Re: James I v1.7.3 My first AI

Posted: Sat Mar 12, 2011 6:16 pm
by St_Aquinas
Thank You for the welcome and the input!

-The "BritmilitaryK" is the AOK friendly file that I test on my system while I wait for my new version of TC to come in, missed changing it when I posted it.

-I was unaware of the restrictions on changing strategic numbers, I will have to create new rules to account for this

-I don't want it to fast castle, but I want it to conserve resources so that it doesn't stay in feudal as long if the opponent castles early

-I will shift the dark age economy to make more farms

Re: James I v1.7.3 My first AI

Posted: Sat Mar 12, 2011 6:27 pm
by jdstankosky
Hey, great to see you make it through the registration gauntlet! I think you'll find yourself getting blasted with more information than you might have expected.

I've been busy with school, work, negotiating an apartment, twins almost here (very preggo wife), and a new obsession with DJing and the new user patch.

Once things settle down, I'll be happy to help you out a lot more! I think you've got what it takes to be great.

Re: James I v1.7.3 My first AI

Posted: Sat Mar 12, 2011 10:17 pm
by MuRRay Jnr
hey st_aquinas.

ill just extend the very big hello and welcome. :D

@jd, i hope you dont have too much trouble with that apartment with usa's housing market problems and (an early) congrats. :D

Re: James I v1.7.3 My first AI

Posted: Sun Mar 13, 2011 8:01 am
by Campeador
Welcome, St_Aquinas.

Here you have an interesting article:
http://forums.aiscripters.com/viewtopic.php?f=3&t=248

One advice: download the ScriptEd program. You can script without problem with the NotePad, but this tool will make your work much easier.

Re: James I v1.7.4

Posted: Tue Mar 15, 2011 1:34 pm
by Suriel
One advice: download the ScriptEd program. You can script without problem with the NotePad, but this tool will make your work much easier.
You may also consider using Notepad++ - very powerful replacement of notepad. Has marcos, advanced searching with regular expressions , plugins etc. I personally prefer it over ScriptEd as it's more comfortable for me :)

Re: James I v1.7.4

Posted: Tue Mar 15, 2011 9:00 pm
by jdstankosky
Suriel wrote:You may also consider using Notepad++ - very powerful replacement of notepad. Has marcos, advanced searching with regular expressions , plugins etc. I personally prefer it over ScriptEd as it's more comfortable for me :)
This is what I use. :dance

Re: James I v1.7.4

Posted: Wed Mar 16, 2011 11:32 am
by St_Aquinas
Right now what I'm doing since my computer is a mac, is emulating windows inside virtual box and using scripted to write and play.
I just got new official disks in the mail for Aok and TC so I should be able to use the patches and updates. Before I was playing a cracked version a friend had given to me. Now I can really see what my script can do against others on the site!

Edit:
I've downloaded the speed selector utility off of aokh, but I don't understand where/how to install it. Can anyone point me in the right direction?