Page 1 of 2

AI improver gadget - new version 1.01

Posted: 15 Oct 2007, 17:31
by BigHead
How it works:
- AI economy runs at 1.5x speed. This means that it needs 1.5x less time to construct anything and it also gets 1.5x more metal&energy.
- AI units start more experienced (equal to rank 2 from Rank Icons widget). This means that they have more HP.
- AI team starts with 2x more resources.
- AIs can be rushed easily so there's rush protection - it has doubled income for first 2 minutes

Plans for next version:
Nice lua dialog for hosting player (yes, it will pop out only if there are AI teams):
The game is paused. Please choose your difficulty setting:
Easy
Medium
Hard

Once you click, the settings will be applied and the game unpaused.
This can't be done properly* until next version of Spring is out, so you'll have to wait :-(.
*trepan :-)

How to tweak this:

Code: Select all

local defaultSettings = {
  buildModifier = 1 / 1.5,
  makeModifier = 1.5,
  xpModifier = 2 -- 0 - not experienced, 4 - "star"
}

local rushProtection = true
local rushProtectionTime = 30
local startResourcesModifier = 4

local rushProtectionSettings = {
  buildModifier = 1 / 2,
  makeModifier = 2,
  xpModifier = 4
}
Install instructions:
Extract into your Spring folder - not into LuaUI

To enable it in-game:
Starts automatically if included in a mod, otherwise you must type these commands in correct order:
.cheat
.devlua
.luarules reload

You should see this message if you did everything correctly: "AI Improver ENABLED"

Credits:
Credits go to authors of AIs. I'm just a guy who was bored while on train and wrote this simple gadget.

Changelog:
- AIs are now aware of increased income (will fight better in long games)
- AIs cheat less

Download:
http://www.unknown-files.net/3698/AI_Improver_101/

Posted: 15 Oct 2007, 17:49
by Forboding Angel
Could you PM me and tell me what it does? I could find out easily enough, but I'm at work. I would really like to know the way it works, considering I'm a pretty serious compstomp player.

Posted: 15 Oct 2007, 17:51
by DJ
I'd be interested as well please

Posted: 15 Oct 2007, 18:14
by Forboding Angel
OK this thing is fucking 100% win.

Posted: 15 Oct 2007, 19:49
by rattle
Let me guess, BLARGH.

Now with less spoilers.

Posted: 15 Oct 2007, 20:40
by BigHead
OMFG can't you read?
Don't spoil the fun - don't write how this works!!!
Quickly, edit your post before moderators discover it otherwise you'll be banned!

Posted: 15 Oct 2007, 20:59
by Forboding Angel
God forbid that you lose to an AI.

Posted: 15 Oct 2007, 21:14
by BigHead
I don't think he wanted to say AI ***ing is a bad thing. Anyway if you want to discuss the issue in this tone use PMs. I don't want this thread to turn into another flamefest.

Edit: And btw noone has anything to say about this? Any interesting battles to describe?

Edit2: I've updated the first post with credits. Something that should've been there from the beginning.

Posted: 15 Oct 2007, 21:49
by Forboding Angel
Edited for the thread's sake

Posted: 15 Oct 2007, 21:53
by Machiosabre
I don't see how you think you can keep that a secret while your own post says to type .cheat :lol:

Posted: 15 Oct 2007, 21:58
by Forboding Angel
you have to do .cheat to access .devlua

Posted: 15 Oct 2007, 22:43
by rattle
Sorry for spoiling, I haven't even had a look at the script then. Its the only simple way of improving an AI I could think of. :P

Posted: 16 Oct 2007, 13:03
by DJ
I think its a pretty poor do that we have to resort to scripts to make the AI's cheat in order to get a strong AI. We've got some damn clever people working on this project, surely one of them fancies the challenge of creating an uber AI>>?

I reckon we need some sort of competition to see who can write the best AI, hoijui is creating a java interface for AI programming which should make it more accessible.

That said this script does work well, thanks

Posted: 16 Oct 2007, 14:21
by imbaczek
Writing an AI for spring is everything but easy and accessible, so that won't happen, I'm afraid. That's also a reason why AIs need some help.

Posted: 16 Oct 2007, 15:49
by BigHead
Go get him Forboding Angel!

99.9% of professional AIs used in commercial games cheat. Yes, even RTS gods from Blizzard (no flame, please) use heavy cheating in their AIs. There's a game called Galactic Civilizations II which is considered to have one of the best AIs in any game. It's praised in every review and mentioned in every trailer. It's turn based so it has all the time in the world to make it's calculations. I beat that AI on hard in my second game. It doesn't cheat on hard setting. However starting from very hard setting it starts to cheat - just an example.

I've updated the first post. Be sure to read it, it has some interesting information.

Posted: 16 Oct 2007, 15:53
by trepan
This won't be possible until next version of Spring is out
Not true, my custom lua messages simply make it easier / cleaner.
You could use a custom command id.

A big problem with your setup is that it probably won't work well with
mods that rely on LuaRules. You might be able to get some of these
mods to include your gadge and widget.

Posted: 16 Oct 2007, 15:54
by BigHead
/me isn't a big fan of hacks.

Posted: 16 Oct 2007, 15:55
by trepan
Or the truth? ;-)

Posted: 16 Oct 2007, 16:00
by BigHead

Code: Select all

You might be able to get some of these mods to include your gadge and widget.
I consider using .luarules reload to be only a temporary workaround until new versions of mods with this included come out :-)

truth ftw 8)

edit: ... but you're right. I've updated the first post. It contains correct information now ;-)

Posted: 16 Oct 2007, 16:01
by Forboding Angel
got news for ya kid...

all "Uber" AI's in any rts game cheat. However, they are generally built with a miscalculation factor so that they will fuck up at random times.