AI improver gadget - new version 1.01

AI improver gadget - new version 1.01

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

AI improver gadget - new version 1.01

Post 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/
Last edited by BigHead on 22 Oct 2007, 19:27, edited 7 times in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post 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.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

I'd be interested as well please
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

OK this thing is fucking 100% win.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Let me guess, BLARGH.

Now with less spoilers.
Last edited by rattle on 15 Oct 2007, 22:44, edited 1 time in total.
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post 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!
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

God forbid that you lose to an AI.
Last edited by Forboding Angel on 15 Oct 2007, 21:49, edited 1 time in total.
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Edited for the thread's sake
User avatar
Machiosabre
Posts: 1474
Joined: 25 Dec 2005, 22:56

Post by Machiosabre »

I don't see how you think you can keep that a secret while your own post says to type .cheat :lol:
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

you have to do .cheat to access .devlua
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post 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
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post 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.
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post 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.
Last edited by BigHead on 16 Oct 2007, 16:04, edited 1 time in total.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
Last edited by trepan on 16 Oct 2007, 15:55, edited 1 time in total.
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post by BigHead »

/me isn't a big fan of hacks.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Or the truth? ;-)
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post 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 ;-)
Last edited by BigHead on 16 Oct 2007, 16:04, edited 1 time in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post 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.
Post Reply

Return to “Lua Scripts”