Leif Ericson AI

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
User avatar
Leif Ericson
Waheguru
Posts: 1423
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Leif Ericson AI

Post by Leif Ericson »

Current Version: Leif Ericson 1.32, updated 10 March, 2022.

Introduction (written in 2010):
This is currently my most advanced AI project to date. It's fairly well tested, but I was
wondering if any of you had some tips on how to make it better. It plays Vikings now
(hence the name Leif Ericson, the Viking explorer who found America around 1000 AD).
However, I plan to eventually expand the AI to cover all civilizations and settings, so
the name will probably change.

Strategy:

Leif Ericson advances to the Dark Age relatively fast and creates a defensive army of
about 10 to 15 soldiers before advancing to the Castle Age. After it upgrades he soldiers
and trains up to about 30 or 40 soldiers he will attack. At the moment he plays better
defensively, such as when his opponent attacks him first.

Update Info:

Version 1.32 - 10 March, 2022:

-fixed looping attack-now commands
-increased the max villagers to 130 and max trade carts to 30
-enabled sn-enable-patrol-attack to help TSA be more intelligent
-added Chieftains tech

Version 1.31 - 3 June, 2010:

-added escrow rules for faster imperial
-various improvements

Version 1.3 (never released) - 30 May, 2010:

-fixed bugs with goals more emphasis on military training
-attacks signals work more often
-added a counter-meso strategy - not well tested
-added a counter-monk strategy - not well tested
-added TSA for initial attack

Version 1.23 - 9 May, 2010:

-added rules for team management

Version 1.23 (Coastal)

-added rules for Coastal maps for the AIScripters 2010 Coastal Tournament

Version 1.22 - 10 April, 2010:

-Fixed mining camp and lumber camp bugs
-limited knights and emphasized berserks

Version 1.21 - 3 March, 2010:

-Fixed farm and castle bugs!
-General efficiency and playing ability improved

Version 1.2 - 20 February, 2010:

Includes rules to counter cavalry
Includes rules to counter archers
Better attacking rules
Better overall economy
Still has farm and buildings bugs!!!! :(

Version 1.11 - 20 February, 2010:

Hopefully fixed the farm bug, but the economy is weaker
Has some rules to enable it to play high resources.

Version 1.1 - 15 February, 2010:

Improved intelligence and efficiency, including Feudal Age time
Attack rules are more intelligent
Upgrades are researched better
Contains building construction bugs especially with farms, unfortunately

Version 1.0 - 2 January, 2010:

First edition. Created for the 2010 AoKH AI Tournament. Long Feudal stay and aggressive
but poor attacking rules.

Settings:
Civilization: Vikings
Game Type: Random Map
Map Type: Any land map (only tested on Arabia)
Map Size: Any
Difficulty: Hard
Other Players: Any (no team management as of yet)
Resources: Standard (Low), has some management for High
Population: 200
Reveal Map: Standard
Starting Age: Standard (Dark Age)
Victory: Prefers Conquest (will not detect enemy-captured-relics or enemy wonders)
Teams Together: Either
Teams Locked: Either (no diplomacy rules)
All Techs: Either (won't research all technologies)
Attachments
Leif Ericson 1.32.zip
Version 1.32, fixed some attack-now bugs and added minor improvements for UP/WK.
(20.1 KiB) Downloaded 224 times
Leif Ericson 1.31.zip
Version 1.31, most updated version from 2010.
(19.9 KiB) Downloaded 192 times
Leif Ericson.zip
Version 1.0, created for the 2010 AoKH AI Tournament. Plays Vikings.
(3.69 KiB) Downloaded 338 times
Last edited by Leif Ericson on Thu Mar 10, 2022 8:46 pm, edited 6 times in total.

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: Leif Ericson AI

Post by scripter64 »

Downloaded :) Thanks Leif!

Archon
Waheguru
Posts: 1905
Joined: Sat Nov 08, 2003 9:22 am

Re: Leif Ericson AI

Post by Archon »

Tested this AI two times against my AIs.

This is actually a very good AI for a first release. It avoids many common mistakes I have seen in other first AIs. This text may sound a little too negative, however I wanted to point out the bad thing to give you some hints for improvement.

Most problems are probably due to the fact that Leif tryed to squeeze it into as few rule as possible. First thing I noticed is that your AI is very slow with feudaling although it trys to flush or at least it makes some units in feudal age. Maybe you should increase your food gatherer percentage a little in late dark-age to get there faster.
Although this is maybe a personal preference I would not mine stone in feudal age, especialy as early as your AI did. Instead, after your AI built an archery-range, a BS and got the basic economy reseaches (your AI did this very fast which is good), you should opt for building a constant stream of farms which allows you to produce more food later in feudal-age where AI lacks of it due to the game engine is limited of building only one farm at the same time.

Probably you already know but your attack needs really some rework. Just attacking in castle age whenever you have 30 soldiers in castle age wont get you anywhere with that. Also you may reduce the number of military explorers from feudal age onwards (perhaps after you spotted some units to make counters) as I think three soldiers constantly exporing is a bit too much. While getting many researches at the beginning of castle-age I noticed that your AI probably barley researches anything else later.

Hopefully you got some points for improvement. Looking forward to see an updated version as this AI seems to have great potential. :)

User avatar
Leif Ericson
Waheguru
Posts: 1423
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Leif Ericson AI

Post by Leif Ericson »

Thanks Archon and scripter64 for the feedback. I'll try your tips Archon. The AI was intended to be short because the AOKH AI tournament was to allow newer scripters a chance to compete. However, now that the tournament is under way, I'll have a chance to expand it.

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: Leif Ericson AI

Post by scripter64 »

Your AI is very impressive and compact! Archon already provided some great advice, so I'll just state one thing that struck me: the AI didn't attempt to collect relics. After studying a great AI like ARFFI De'gel, I've learned that it is incredibly important to control at least some of the relics: not only for your AI's own benefit, but to deprive other players of free resources in longer games. I'm sure this is one of those things you've already thought about for the expansion you're planning, though; I look forward to seeing this new AI grow!

Alien_Nation
Forumer
Posts: 16
Joined: Fri Dec 11, 2009 12:21 am
Location: Nomad

Re: Leif Ericson AI

Post by Alien_Nation »

Downloaded :)

Thanks Leif :)

User avatar
Leif Ericson
Waheguru
Posts: 1423
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Leif Ericson AI

Post by Leif Ericson »

Update: Leif Ericson V1.1

Please download and test this new version. It beats the old version about two times out of three, and it is much more intelligent and efficient. Its Feudal Age time is cut by about 3 minutes. However it contains a few critical bugs which I wasn't able to solve...

The biggest bug is that halfway through the Castle Age it stops building buildings, including farms. It won't build castles either, which is probably related to problem #1. The second is that it won't build more than two lumber camps or two mining camps. I'm guessing this isn't related to problem #1 because this has been true of nearly all my AIs.

If any of you have time, please look at the strategic numbers or the building rules to see what could cause the errors. Any help is greatly appreciated. :)

User avatar
MuRRay Jnr
Waheguru
Posts: 1990
Joined: Mon Jul 27, 2009 3:03 am
Location: Queensland, Australia

Re: Leif Ericson AI

Post by MuRRay Jnr »

hey lief

if i get the time ill have a look but ive had those problems before

the first problem, ive had twice
the first time it was because it was waiting for a market to be built and the town size was too small to fit the market so it just didnt build anything including farms
dont remember how i fixed it the second time

the mining camp problem has always been a problem for me

i'll have a look

edit:
it'll have to be tonight if i get on my laptop
my work computer cant handle .rar
cheers,
murrayj

my current attempt at scripting, avarice ai

User avatar
Leif Ericson
Waheguru
Posts: 1423
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Leif Ericson AI

Post by Leif Ericson »

The market is fixed now. It's a major part of the AI. Farm construction is perfect until the AI just stops constructing buildings.

I'll upload a zip version in a few seconds...

User avatar
MuRRay Jnr
Waheguru
Posts: 1990
Joined: Mon Jul 27, 2009 3:03 am
Location: Queensland, Australia

Re: Leif Ericson AI

Post by MuRRay Jnr »

ive had a look at it and i couldnt spot any of the mistakes that i make

i'll run it next when i get the chance
cheers,
murrayj

my current attempt at scripting, avarice ai

Post Reply