There are really two problems involved here (not counting teambuilding, which is a third problem). Things like deducing the opponent's set based on the damage your moves do to them, and vice versa, is not an AI problem at all, but one of calculation; and programs to do that sort of thing exist already (DougJustDoug's damage calculator, for instance, already deduces EVs from damage; all that would be needed to adapt it to work with an AI would be to allow for the probabilistic factor, and change the interface from a human-usable one to a bot-usable one; both pretty large tasks, but no problem in theory). Arguably, an automatic EV/item-deducer would be useful even in human vs. human play; it could make for a fun Shoddy plugin, for instance. (I wonder if people using it would be accused of cheating?)Obi, it would be incredible if you could build such a program. 'Twould make pokemon somewhat like chess in that regard, but humans would still be necessary to build the teams. However, I would suggest that you consider a watered-down version of the program first. For example, reverse engineering the EVs might be somewhat challenging, as you have to consider the opponent's pokemon's held item and nature and the randomness of the game. Perhaps getting a working framework and then improving that would be a better strategy.