New AI routine

General conversation and discussion about the game, feedback and suggestions

Moderators: psantos, llandeiro

Posts: 15
Joined: Mon Feb 14, 2011 3:19 pm

New AI routine

Postby eldallone » Sat Oct 15, 2011 11:02 pm

I would like to suggest some improvements to the new AI routine:

a) To keep cenario balanced AI should be activated to all free lands as soon as the cenario start ;

b) Even with AI activated these land should be available for new players to join the cenario ;

With a) and b) cenarios could start without the need to have all lands assigned, and new players would not have the huge disadvantage of joining the game after it already started.

Currently AI is playing offensively and it goes after his enemies. This seems nice because it plays like a real player, but in my opinion this is not as great as it seems because:

a) You can't deal with AI, if you become enemies, it will stay your enemy until one of you is dead.

b) It doesn't seem fair that a human player (paying player) can be destroyed by AI, and believe me AI will play better than a great deal of Almansur players.

I would rather have a defensive AI, and by this I mean a AI that would not go after enemy land but that would not stop until it get back all his original territories.

But if you chose to keep it offensive you should improved it a bit:

a) AI should never declare war to other lands. They should be allowed to cross neutral lands without starting a war and can only be attacked by lands already at war. AI army markers should have a distinct color.

b) Players should always have the chance to propose peace to AI control land. AI would only accept the peace offer if the proposing land doesn't have any of his original territories. And it would be fun if AI demand war compensations like: land, gold, food, etc...

c) If any original territory from a land controlled by AI is given to another land they immediately become at war and to end war the territory should be given back.

d) AI would never forget about his original land, but after a while controlling a territory that was not originally his, it should have the capacity to consider it like his original territory.

Posts: 93
Joined: Mon Aug 31, 2009 10:55 pm

Re: New AI routine

Postby Woah » Mon Oct 17, 2011 10:27 pm

Ohh an topic about the new AI :)

I'll answer each type of question separately, for easy future access.

eldallone wrote:a) To keep cenario balanced AI should be activated to all free lands as soon as the cenario start ;

b) Even with AI activated these land should be available for new players to join the cenario ;


These are game design decisions relative to static scenarios. PSantos can probably give you an final answer, but I'd say it is quite likely this will happen in the future.

eldallone wrote:With a) and b) cenarios could start without the need to have all lands assigned, and new players would not have the huge disadvantage of joining the game after it already started.


One can argue there is always an imbalance (not necessarily always an disadvantage) in joining the game late, especially with AI's playing offensively against each other. Some Lands are bound to get ahead and offer an advantage to players picking them while others lose and offer an disadvantage instead.

eldallone wrote:Currently AI is playing offensively and it goes after his enemies. This seems nice because it plays like a real player, but in my opinion this is not as great as it seems because:

a) You can't deal with AI, if you become enemies, it will stay your enemy until one of you is dead.

b) It doesn't seem fair that a human player (paying player) can be destroyed by AI, and believe me AI will play better than a great deal of Almansur players.

I would rather have a defensive AI, and by this I mean a AI that would not go after enemy land but that would not stop until it get back all his original territories.


The AI was intended to be a complete replacement for human players (who went inactive, for example). After you have the baseline AI, depending on the opponent and game mode, it is easy to make difficulty modes and allow it to be dumbed down if required.

Some players might want to be destroyed by the AI, in order to learn the game for example. The defensive AI idea, while interesting in theory, is only possible to do in games where all map is split between Lands already (so it rules out any game where players need to conquer stuff around their capital to expand on the start) and it also makes the AI even easier to predict and identify, which takes some exploration out of the game.

eldallone wrote:But if you chose to keep it offensive you should improved it a bit:

a) AI should never declare war to other lands. They should be allowed to cross neutral lands without starting a war and can only be attacked by lands already at war. AI army markers should have a distinct color.


The automatic war declarations are part of the game design, in order to avoid armies getting stuck on territories they can't leave (since you can't move in territories you have peace relationship with) so removing them would bring other, more serious, problems.

Only being able to be attacked by Lands already at war, thus forcing a human to be already at war with other human before attacking an AI, has the problem of narrowing the game even more, and creating potential weird limit situations where a human player would be stuck because of all nearby players being AIs..

eldallone wrote:b) Players should always have the chance to propose peace to AI control land. AI would only accept the peace offer if the proposing land doesn't have any of his original territories. And it would be fun if AI demand war compensations like: land, gold, food, etc...

c) If any original territory from a land controlled by AI is given to another land they immediately become at war and to end war the territory should be given back.

d) AI would never forget about his original land, but after a while controlling a territory that was not originally his, it should have the capacity to consider it like his original territory.


Interesting ideas for the future, although judging by what human players already do, asking for tribute isn't usually very useful. Point c and d are also not trivial at all to implement and, again, only work for maps where all territories are taken from the start, which is only part of what Almansur is all about.

Just a few general thoughts:

1) Generic purpose AI needs to be able to attack as well defend and play as well as it can with what it has available. If required, it can then be dumbed down for players who require it.

2) AI changes, especially ones that require source code changes, should be done to improve the AI as a whole, rather than tweaking particular types of games / strategies, as that would make the AI less versatile and cause a lot of problems when the game changes (such as 2.0 to 2.2 version).

3) Making the AI players easy to identify makes it nigh impossible to do certain things with it, such as replacing inactive players / going in vacation mode (which you suggested, actually :P). The AI plays better than some players, but it also plays worse than some and those would waste no time to attack you and take advantage of its limitations..


So, overall, there are a lot of things that can be done with AI in the game and game designers will surely take advantage of it in the future. For now the idea is that the AI blends in as much as possible with human players, which is the most subtle use of the AI possible. It doesn't really mess with players' experiences and serves as an challenge in place of an otherwise inactive player, which if you played the old versions without AI used to be milked extensively for free territories, not exactly much fun :)

Thanks for the input and keep forum active! ;)

Posts: 15
Joined: Mon Feb 14, 2011 3:19 pm

Re: New AI routine

Postby eldallone » Tue Oct 18, 2011 9:51 pm

Woah wrote:Some players might want to be destroyed by the AI, in order to learn the game for example. The defensive AI idea, while interesting in theory, is only possible to do in games where all map is split between Lands already (so it rules out any game where players need to conquer stuff around their capital to expand on the start) and it also makes the AI even easier to predict and identify, which takes some exploration out of the game.


To be honest I don't see this as a problem, and it works for all type of cenarios, AI will try to conquer all neutral territories around him. And like any regular player can send scouts to see even further away. Any neutral territory conquered it will be consider by AI as his original territory, and you can even register the previous owners so AI can tell the difference from a recently neutral conquered territory and avoid players to try to avoid it from considering it as his original territory. There are so many ways to do it, the hard part is to set a path for it...

Woah wrote:The automatic war declarations are part of the game design, in order to avoid armies getting stuck on territories they can't leave (since you can't move in territories you have peace relationship with) so removing them would bring other, more serious, problems.


The main problem is that currently players can take advantage of the offensive AI to place all neutral lands between them and the AI at war with the AI because while crossing their territory to get him the AI will declare war to them...

Woah wrote:Only being able to be attacked by Lands already at war, thus forcing a human to be already at war with other human before attacking an AI, has the problem of narrowing the game even more, and creating potential weird limit situations where a human player would be stuck because of all nearby players being AIs..


I didn't get your idea...

Woah wrote:Interesting ideas for the future, although judging by what human players already do, asking for tribute isn't usually very useful. Point c and d are also not trivial at all to implement and, again, only work for maps where all territories are taken from the start, which is only part of what Almansur is all about.


Like answered before its possible and only depends on the way its done...

Woah wrote:1) Generic purpose AI needs to be able to attack as well defend and play as well as it can with what it has available. If required, it can then be dumbed down for players who require it.


I Suppose you are talking about private cenarios, right?

Maybe having from start individual random values to decide how good an AI is going to play until the end of game and allowing it to learn (like human players) would make it even more interesting.

Woah wrote:2) AI changes, especially ones that require source code changes, should be done to improve the AI as a whole, rather than tweaking particular types of games / strategies, as that would make the AI less versatile and cause a lot of problems when the game changes (such as 2.0 to 2.2 version).


I'm just the "idiot", for me is very easy to shoot up ideas because I really don't know what are the real consequences to the code! ;)

Woah wrote:3) Making the AI players easy to identify makes it nigh impossible to do certain things with it, such as replacing inactive players / going in vacation mode (which you suggested, actually :P). The AI plays better than some players, but it also plays worse than some and those would waste no time to attack you and take advantage of its limitations..)


I agree, and my post was about suggestions for things that could be improved, but I don't have access to the code, neither have a clue about your commitment to change it, so depending on the last two, my suggestion can really seem "stupid"!

Woah wrote:So, overall, there are a lot of things that can be done with AI in the game and game designers will surely take advantage of it in the future. For now the idea is that the AI blends in as much as possible with human players, which is the most subtle use of the AI possible. It doesn't really mess with players' experiences and serves as an challenge in place of an otherwise inactive player, which if you played the old versions without AI used to be milked extensively for free territories, not exactly much fun :)


I agree, better to have AI even if it spanks some human players than having a cenario being decided to whom have conquered more farms...

Posts: 93
Joined: Mon Aug 31, 2009 10:55 pm

Re: New AI routine

Postby Woah » Wed Oct 19, 2011 9:48 pm

You can always abuse stuff like AI no matter how well it is built :)

Thanks for the input and we'll see what we can do! ;)

Return to The Round Table

Who is online

Users browsing this forum: No registered users and 1 guest