Originally Posted by Fat cantab
About entry hazards - for an offensive team, how much they're worth depends on how many of the AIs team members gain nHKOes on how much of 'the metagame' with the hazard.
Well this depends on whether you want the AI to play to the metagame the way we do or to do things differently. I personally think a 'metagame-aware' AI with some kind of access to Smogon's statistics and analyses would be at the very least beneficial to the bot's success rate.
Honestly the hardest part of the AI is going to be to get it to play the metagame as well as a human. People know the ins and outs of their teams. I for instance know that certain threats maim me if I lose my counters/checks, and as such try to play carefully until such a time I know I can handle it. The classic example would be Magnezone and Scizor I guess.
As such while you are working on the AI it might be worthwhile to cheat a bit and use say a Yawn Swampert lead to help scout and easy the imperfect knowledge problem.
Originally Posted by Fat cantab
Almost everything useful a Pokemon can do relates to damage. Attacks, poison and burn, entry hazards, and phazing with entry hazards cause it. Stat boosting increases the ability to cause it. Healing moves remove it from yourself. All status except poison (including Taunt) inhibits the opponent from causing it to you or healing it from them.
You could insert a large 'gap' between 1 and 0 HP, to encourage KOing a weak Pokemon rather than denting a strong one. You might also add a small weighting towards reducing uncertainty, so the AI would 'scout' if it's running a phazing move.
Except in the real game a player will often forego dealing damage in order to setup, which is to say potentially increace/decreace future damage against the opponent/themselves respectively. The thing is this is just potential. Sword Dance on Lucario deals no damage, yet you could sweep the opponent or a Gliscor could come in an ruin your fun.
In Pokemon there are many instances where if you are losing, you have to risk throwing the match to make a comeback. There is no point min-maxing if your last Pokemon can only take out 2 of their 3 Pokemon, whereas the risky move may end the game prematurely, but is the only chance of winning.
The aim of the game is to win the battle, so the AI should assess the situation (ie Lucario 97% VS Suicune 88% and two known others that can be OHKOed after an SD) and see that the only way to win is to SD. Its better to have an AI that actually wins 30% of the time than one that nearly wins 80% of the time.
There is also the concept of overkill, why go to +3 if +2 lets you sweep. Similarly if a moves does 55% why go to +1 as you still only 2HKO.
Originally Posted by Fat FlareBlitz
However, an actual player would, upon seeing Bronzong switch in, notice that it has taken damage from Spikes, and would therefore simply use the Ground attack, which is the optimal choice. I feel that in order for an AI to be successful, it certainly needs some rudimentary prediction and extrapolation skills, and I'm curious as to how you will program this in.
One of the easiest parts of the AI is gathering data, its using it to win thats hard. The AI should basically start out with a blank sheet each game and add every bit of info it can glean as the game unfolds. For example on the first turn it adds the Lead's species, level, gender and any other information that may be apparent such as an ability. Then using a set of rules it would gather more and more info about the opposing team, if you Surf a Scizor and it takes 40% you can learn something about how bulky it is as your Surf's power is knows give or take 15%. The AI should attempt to keep track of movesets, PP, approximated stats and so forth. Then this information is used in the evaluate function to help pick an optimal move. Of course you've already done some of this, but just clarifying for those who asked.
Now the big question of what values to assign to what, this needs to be derived from the team the AI is being given and will vary throughout the game as more data is attained.
One thing that is going to be very hard to model is the concept of fear. Generally speaking in Pokemon the closer something gets to being guaranteed the more likely players are to make risky moves. For instance Gengar VS Scizor. The logical move is to Bullet Punch as its a KO, yet because its so logical you'd expect them to switch out so you might try to Pursuit/U-Turn, however the opponent thinks the same and stays in and Gengar kills you. This kind of cat-mouse prediction in AI is going to be tough, I guess minmax will just do its thing here.
I'm just spewing thoughts here as I can't even begin to imagine how complex the process our brain naturally just handles when we play is.