AI points system
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
AI points system
I would like to propose that, in order to improve the AI, there is a points system initiated. Eve though I am not a programmer it seems easy to implement because it is based on variables. The system would work something like this:
1) During every turn, the AI assigns a value to each unit. it would assign these points based on normal damage dealing ability(without modifers), max hit points, current experience(or maybe experience needed), and proximity to strategic terrain(Explained later). Leaders would have the highest value. This will show the AI what enemy units it should kill, as well as what units it should retreat.
2) Each unit will also have a danger value based on the terrain it stands on, its current HP, and its current damage dealing ability. This will show the AI which units to avoid and which units to defend with.
A note on strategic terrain: Strategic terrain is based on the advantage it will give to both the player and The AI. a Dwarf AI will place great value on Mountains while a Elf AI will go for Forests. If they were both playing against each-other, both AI's would "Realize" that mountains and forests were valuable to each-other and fight over them.
I hope that people will give advice to this idea and eventually it might be implemented in a streamlined form.
1) During every turn, the AI assigns a value to each unit. it would assign these points based on normal damage dealing ability(without modifers), max hit points, current experience(or maybe experience needed), and proximity to strategic terrain(Explained later). Leaders would have the highest value. This will show the AI what enemy units it should kill, as well as what units it should retreat.
2) Each unit will also have a danger value based on the terrain it stands on, its current HP, and its current damage dealing ability. This will show the AI which units to avoid and which units to defend with.
A note on strategic terrain: Strategic terrain is based on the advantage it will give to both the player and The AI. a Dwarf AI will place great value on Mountains while a Elf AI will go for Forests. If they were both playing against each-other, both AI's would "Realize" that mountains and forests were valuable to each-other and fight over them.
I hope that people will give advice to this idea and eventually it might be implemented in a streamlined form.
The dragons are all colour-coded,
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
I do. If a unit is more expensive then another one doesn't really matter (most of the times anyway), positioning, hp, xp, damage and such however do matter. The AI will fight a lot more inteligent this way, going after the important units, not only the expensive or weak.Dacyn wrote:isn't this basically how the AI already works?
(actually, unit values are currently based only on cost, but I don't see why your system would be better...)
I heard they were stoned out of their minds, trying to convince the Statue of Liberty to get naked...
CCBS - Compulsive Cat Biting Syndrome, when you know that kittens shouldn't have heads attached to their bodies.
CCBS - Compulsive Cat Biting Syndrome, when you know that kittens shouldn't have heads attached to their bodies.
What ive noticed is that the AI will chargeright into a horde of my strong units just to get at a weak one. The AI doesn't seem to have any regard for its own troops.
The dragons are all colour-coded,
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
Sorry, I meant to say that a unit's intrinsic value is determined only by cost[1]. Current HP and positioning are of course taken into account... (XP is generally not taken into account except for the opponent IIRC, but this is because it would be difficult for the AI to advance units anyway)Jester wrote:If a unit is more expensive then another one doesn't really matter (most of the times anyway), positioning, hp, xp, damage and such however do matter.
IIRC that's based on the WML settings and not the AI itself. (so it can change from scenario to scenario)TheLost1 wrote:The AI doesn't seem to have any regard for its own troops.
Also, consider that there may be a reason. The AI does not have to conserve troops for the next scenario, so killing off a wounded lvl 2 unit could be worthwhile even if it completely exposes the AI's troops.
I would advise not making any suggestions about the AI unless you look at code, though...
[1] Actually this rule is not true for leaders
-
- Posts: 580
- Joined: February 14th, 2006, 3:24 am
- Location: New Avalon
- Contact:
http://www.wesnoth.org/wiki/AiWML
aggression This key affects how an AI player will fight.
It determines how an AI considers the difference between its units and its opponents by taking the value 1 - AI unit value in proportion to opponent unit value. ('Unit value' here means that the AI weights its decision on the chance to kill a unit or be killed, using a combination of its own units.) So, to make an AI which considers its units worthless i.e. only cares about how much damage attacks inflict, set aggression at 1 - 0 = 1.0. This is the highest meaningful value for aggression; although it is insane, it is used on many HttT levels. If an AI set on this value can inflict 1 damage and take 0, or inflict 2 damage and take 20 himself, he'll take the latter option. To make an AI which considers its units equally as valuable as its opponent's i.e. only attacks if he feels he can inflict more damage than he receives, set aggression at 1 - 1 = 0.0. Although an AI which considers its opponent's units worthless is impossible under this scheme, an AI which, for example, considers its units twice as valuable as its opponent's can be represented by aggression 1 - 2 = -1.0. having to be able to inflict more damage than he takes for it to be worth his while. The default is 1 - 1/2 = 0.5, which means the AI is content with dealing only half the damage to his opponent of that which he himself takes.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
-
- Posts: 580
- Joined: February 14th, 2006, 3:24 am
- Location: New Avalon
- Contact:
Have fun and let us know when you've got a working model.Eve though I am not a programmer it seems easy to implement because it is based on variables. The system would work something like this:
Why are you even concerned with AI in 'multiplayer'. The point of multiplayer is... oh forget it.I was talking about multiplayer.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
Re: AI points system
1. Just about everything in programming is based on variables.TheLost1 wrote:Even though I am not a programmer it seems easy to implement because it is based on variables.
2. Traditionally, it's the non-programmers who think that features are easier to code than they actually would be. It would make sense for a programmer to say "Even though I am a programmer it seems easy to implement."
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
- irrevenant
- Moderator Emeritus
- Posts: 3692
- Joined: August 15th, 2005, 7:57 am
- Location: I'm all around you.
I thoroughly disagree with this. You don't have to be a programmer to be familiar with how the Wesnoth AI plays; you just have to be observant. You don't have to be a programmer to notice something wrong that could use improvement.Dacyn wrote:I would advise not making any suggestions about the AI unless you look at code, though...
Of course, if you aren't a programmer, you're not in a position to judge how feasible fixing it is, either...
I'm quite tired of seeing this type of comment. I know the Open Source model is 'muck in and do it yourself' but that doesn't mean we should just ignore when someone without coding skill spots a problem.SmokemJags wrote:Have fun and let us know when you've got a working model.
There's nothing wrong with Multiplayer vs the AI. For starters, the AI tends to complain less when you only have time to play a game in 5-10 minute snatches.SmokemJags wrote:Why are you even concerned with AI in 'multiplayer'. The point of multiplayer is... oh forget it.
Want to post a Wesnoth idea? Great! Read these:
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
The point is, it's easy to spot i.e. "everyone" knows about it. So unless you're actually able/willing at working towards a fix it's a bit pointless to make any comments.irrevenant wrote:I thoroughly disagree with this. You don't have to be a programmer to be familiar with how the Wesnoth AI plays; you just have to be observant. You don't have to be a programmer to notice something wrong that could use improvement.Dacyn wrote:I would advise not making any suggestions about the AI unless you look at code, though...
And as no-one is really working at the AI currently...
It is however slightly annoying if obvious problems are pointed out and suggested fixes show that there was not much effort taken to examine the current situation.irrevenant wrote:I'm quite tired of seeing this type of comment. I know the Open Source model is 'muck in and do it yourself' but that doesn't mean we should just ignore when someone without coding skill spots a problem.SmokemJags wrote:Have fun and let us know when you've got a working model.
"If gameplay requires it, they can be made to live on Venus." -- scott
Suggesting something wrong, maybe. Suggesting a system which is similar to what we already have, but worse, seems totally pointless. So to rephrase, I would advise not suggesting a detailed system for the AI to follow unless you know something about the system it follows currently...irrevenant wrote:You don't have to be a programmer to be familiar with how the Wesnoth AI plays; you just have to be observant. You don't have to be a programmer to notice something wrong that could use improvement.
Although you might not have to look at code to do this; for example there is a reference at AiWML:
It decides upon 'targets', assigns those targets values, and moves units toward targets based on how easy it is to get to the targets, and how valuable the targets are.