News:

Please help making MegaGlest rock-stable by testing the pre-release snapshots.

Main Menu

"Treaties"- Betray friends, Bribe your enemies or join them!

Started by Idanwin, 19 December 2008, 14:35:01

wciow

Sorry guys but I really don't think this is going to work. All the rts games i have played which implement some form of AI alliance/trading with the player are downright stupid and easily exploited by the human. This includes commercial games with full time coders dedicated to AI.

Good AI can be done (see Hearts of Iron series, or any Paradox game) but would be far too complex and time consuming for its benefits in Glest.

As those above have said an attempt at a simplistic AI alliance function would just ruin Glest.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Omega

If I may,  I do think it may be possible to do this in lua. Off the top of my head, the following commands would be needed:

-Function to get text typed into the chat (ie: to ask for a gold trade)
-A way to remove resources (can this be done with a negative number in giveResource()?)
-Send massive attack (force the AI to send their massive base attack to a specified target).
-Change teams (a function to change teams on the fly).

That's all that I can think of, and with some clever coding, randomization, and a touch of "genius", it might very much be possible!
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Gabbe

But the AI should be able to choose desireable alliances, but not starghtforward unite all the AI...

Omega

Oh, that's where lua comes in. With current Lua, it would be random, but if we had functions to get our resources, the number of resources around, current number of military units, current number of building, etc, we could make smarter AIs that made alliances based on how well they would profit from it, and set conditions for that.

For example, if you are weak, the AI would probably demand at least some form of payment if they're gonna protect you. But if you are strong, the AI will gladly join you as your ally.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Gabbe

liek if you have 10 more military units than the AI you won`t pay tribute, if you have 5-0 less untis than the AI it will require a small fee and if you have 10 or more less military units, alliance will require vast amounts of trubute?

Omega

Sort of, but with some randomization as well. And of course, some AIs will always hate you. This AI scenario would be best with the maximum 16 players.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Gabbe

yap, 16 players and alliances will be almost required...

wyvern

play warzone and you'll see some major faults in the alliances. don't get me wrong though the idea is very appealing

Gabbe

simple alliance systems do not fail, but you can see the fake. Glest is simple, so we can have simple alliance system, if you want a good examples, look at EE2 they got alliance system right.

Omega

RTS's have it hard. Civ 4 has a very good one. I'm not thinking a normal alliance system, but just a scenario based on powered by Lua.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

Quote from: Omega on 28 May 2010, 16:29:31
RTS's have it hard. Civ 4 has a very good one. I'm not thinking a normal alliance system, but just a scenario based on powered by Lua.

While the AI in Civ4 is pretty good, it's far from perfect, and the 'logic' for deciding on accepting/proposing alliances is fairly straightforward, and easy to predict/exploit.

I'm with John & wciow on this one, too hard to contemplate for now, maybe later when the AI is being actively worked on, but I think changing alliances in game is not a good thing in general, so probably not even then.

Quote from: Omega on 28 May 2010, 15:47:13
If I may,  I do think it may be possible to do this in lua. Off the top of my head, the following commands would be needed:

-Function to get text typed into the chat (ie: to ask for a gold trade)
-A way to remove resources (can this be done with a negative number in giveResource()?)
-Send massive attack (force the AI to send their massive base attack to a specified target).
-Change teams (a function to change teams on the fly).

giveResource() with negative amounts should work. While your other requirements would be mostly straightforward, unfortunately the 'change teams on the fly' one would be a little tricky... although I was looking at changing how visibility is maintained, so maybe some time in the not too distant future...
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

True, though I do think that "change teams on the fly" could be quite handy in a large degree of scenarios (betrays, storylines, campaigns, etc).

I should mention another: a way to kill a unit.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert