This thread has been mostly a "general AI questions thread", so I'm modifying the title to say so.
On Stealth Rocks: when there are unknown pokemon it may help to use some data on the usages of pokemon and leftovers to determine the amount it will lower the opposing pokemons score by (this score will then be moved up or down depending on what is revealed). The amount that it lowers the score by will be affected by things like typing, leftovers, and recovery moves, right?
That's somewhat what I'm doing right now. I have an incomplete evaluation function (as soon as I get enough of my code working to run a few tests, I'll post what my incredibly arbitrary and definitely wrong values are). The way I have it, Pokemon have scores and moves have scores (and teams have scores). For example, if a Pokemon is hit by Taunt, the score of their moves that are blocked by Taunt drop down low (not to 0, because it's not a permanent state, but very close).
Also, another problematic move may be taunt. It requires values of problematic battle effects, and it would really help to know the common sets of opposing pokemon (and distinguish between, say common leading sr's and other movesets that would be much more common if they are in other places in the team). It will also weight the chance that it makes the opposing move do nothing versus them using an attacking move, but that can just be done with probabilities.
I'm thinking of doing the following for the first draft of the AI as a coding simplification: Assume the most likely members of their team are on their team, and assume the most common move set is their move set. For instance, the battle starts and I have Hippowdon and they have Heatran. OK, then I'll assume their team is Heatran, Scizor, Latias, Salamence, Tyranitar, Jirachi (5 most common Pokemon on the Heatran teammate statistics) and their move set is Earth Power, Explosion, Fire Blast, Dragon Pulse @ Choice Scarf. As I get more information, I'll refine this data. At some point, I'd probably make my algorithm a little more sophisticated, for instance, if the top moves for Heatran were Fire Blast, Flamethrower, blah, blah, I would not assume it has both Fire Blast and Flamethrower.
Eventually, I might do something smarter than that, but this seems like a good start that will tend to be mostly accurate.
Have you considered the possibility of making some killer moves to reduce the amount of nodes that have to be traversed? I feel that this could especially useful in the middle of the game when a lot about your opponents team is known, but not there are too many possibilities, so it can't just be brute-forced.
Yeah, I'm looking into alpha-beta pruning for this, and the killer heuristic just might be the best. I haven't really looked to much into the advanced heuristics yet, just because I'm trying to work on a sensible representation of the game tree with alternating player nodes and chance nodes where the order of the player nodes isn't fixed.
Finally, can you post the exact point values of some different types of moves/pokemon and some modifiers that you have so far (or just snippets of code)?
As soon as I get it working a bit so I can test them. Right now everything is a total guess. With the methodology I used, my numbers would be useless. They're probably within an order of magnitude of being correct, which is absolutely horrible.
One issue I'm having is the consequences of your apparent decision not to make the AI 'cheat' by having perfect knowledge of the opposing team.
I answered most of your post in my response to the previous post, so I'm just going to focus on the differences.
It's not that I made the decision not to have the AI cheat, as it's not possible to have it cheat unless it were playing server-side, in which case I might as well cheat by giving it all critical hits or something like that. It will use as much information as is available to it, which is to say: everything available to any player.
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.
That's actually an example in which mini-max would be better than your average amateur, as long as it has enough depth to see this. If a path has a 0% chance to win if you search deep enough, that path should never be taken (unless all paths lead to a sure loss). A deep search doesn't care about the score of the game at intermediate nodes, only at the nodes at the end. In other words, the AI is perfectly happy to sacrifice 5 Pokemon along its search tree if, at the end, it wins. The only time that such a situation comes up is if the AI can only search 3 turns ahead, but the win will take 4 turns, for instance. Then it will stop right before it can win and evaluate the state and think that this path leads to a loss.