Author Topic: "Treaties"- Betray friends, Bribe your enemies or join them!  (Read 7297 times)

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #25 on: 27 May 2010, 08:39:29 »
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

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #26 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).

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

  • Guest
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #27 on: 28 May 2010, 15:55:27 »
But the AI should be able to choose desireable alliances, but not starghtforward unite all the AI...

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #28 on: 28 May 2010, 16:04:26 »
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

  • Guest
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #29 on: 28 May 2010, 16:06:55 »
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

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #30 on: 28 May 2010, 16:10:32 »
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

  • Guest
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #31 on: 28 May 2010, 16:23:20 »
yap, 16 players and alliances will be almost required...

wyvern

  • Guest
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #32 on: 28 May 2010, 16:24:52 »
play warzone and you'll see some major faults in the alliances. don't get me wrong though the idea is very appealing

Gabbe

  • Guest
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #33 on: 28 May 2010, 16:26:30 »
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

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #34 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.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #35 on: 29 May 2010, 00:29:11 »
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.

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

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: "Treaties"- Betray friends, Bribe your enemies or join them!
« Reply #36 on: 30 May 2010, 04:10:44 »
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