|
|||||||
|
|
Thread Tools |
|
|
#26 | |
|
Join Date: Oct 2009
Posts: 3,358
England
|
Quote:
You could add more randomness if your wanted to weaken the AI, but I don't think that's the best way. I reckon an AI on weaker settings ought to play like a weaker human. So do things like discard sets or even whole Pokemon from its database. You could bias it towards not considering recently-developed sets, to simulate a human player who's reasonably good but not 'current'. Or you could give it knowledge of the 'wrong' tier, to be like someone who's good in OU but a novice in Ubers. At a very weak level it might even make mistakes with the type chart. If the AI teambuilds, then at a weak level it builds teams with little synergy and overall strategy, teams just of six strong Pokemon thrown together. Of course, obi needs to develop the AI first. Then I'd expect his main focus will be on strengthening it, but it's worth taking a look at weakening it. Perhaps one could do a variant on a Turing test - can a battler distinguish a human player from an AI 'set' at the same rating?
__________________
"If I may guess, Emboar might be an exception to the norm that the scalding liquid is expelled from the Pokémon's mouth" - Cobraroll, on Emboar learning Scald. "Nothing like a cup of tea to start off the day" - Professor Oak, EP025. |
|
|
|
|
|
#27 |
|
Fast-moving, smart, sexy and alarming.
![]() ![]() ![]() ![]() ![]()
Join Date: Aug 2005
Posts: 5,152
|
I'm not interested in creating watered down versions of the AI.
To address the issue of replaying a computer to try and "cheat" it, the ideal strategy for the AI is not "in this situation, use this move", due to the simultaneous execution of moves. The actual perfect strategy is what's known as a mixed nash equilibrium. What this means is that it plays all moves with a certain probability. In other words, 10% of the time, use move 1, 60% use move 2, 30% switch, all other options use with 0% probability. Of course, it will be a long time before I add that level of sophistication to the program, but I mention it to show your problem is not insurmountable and does not require having the AI play at a weaker level. I've solved the problem of a lot of battle effects. Rather than trying give a boost to a team that uses Rain Dance, for instance, I simply have multiple spots in which I score things. The Pokemon themselves get scores for various aspects like how much % HP they have remaining, but each Pokemon's score is the sum of the general Pokemon stuff along with the score of each of their moves. In other words, I have a move evaluation function. Fire moves get a higher score when the sun is shining, but a lower score when it's raining. Physical moves are worth less while Reflect is active. Similarly, each team's score is the sum of the scores of all the Pokemon, plus some general team stuff (such as the total number of Pokemon alive). The final score is my team's score - foe's team score. Using this approach of multiple levels of evaluation makes field effects much simpler to evaluate. I'm thinking maybe Stealth Rock itself will have no intrinsic value (outside of PP concerns), but while it's down it lowers the score of all Pokemon on the side that it's down on. The reason that I can't simply find the expected damage over time of Stealth Rock is that it's possible to do 600% damage over time with Stealth Rock and leave the opposing team at 90% health on 6 Pokemon. The reason is that they can use Leftovers and healing moves to counteract slow damage. A move that does 100% damage to one Pokemon in one turn is usually more valuable than one that does 300% damage total to all 6 Pokemon over many turns, based solely on that concern. Of course, Stealth Rock is a "fire and forget" kind of move, meaning I can be using moves that do 87.5% damage in one turn after using Stealth Rock, and suddenly it's like I'm doing 100% damage per turn.
__________________
Previously obi. Technical Machine, a Pokemon AI. "Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat." - Sun Tzu |
|
|
|
|
#28 |
|
This was never a story that would have a happy ending.
![]() ![]()
Join Date: Sep 2009
Posts: 2,041
Somewhere on the edge of the bell curve
|
If you're already adjusting scores for things like how much HP each Pokemon has remaining, why not just count hazards by automatically "discounting" the hazard amount from a Pokemon's HP and reflecting that in its score? i.e. If rocks are down and you have a Salamence, just count its score the same as it would be if Rocks weren't down but it's at 75%. Or maybe that's already what you're doing and I just didn't interpret your post correctly.
__________________
Everything was beautiful. Nothing hurt. I'm back, baby. Look for me in 5th gen UU! |
|
|
|
|
#29 | ||
|
Join Date: Jul 2009
Posts: 300
|
Quote:
As you mention later in the thread, finding a mixed equilibrium avoids this problem (and shouldn't actually be too difficult; you can do 81 separate, relatively shallow, analyses, one for each of the possible 9 moves that the opponent could use, and one for each of the possible 9 moves that you could use, then use the standard formulae to calculate the perfect mixed strategy). The usual caveats about mixed equilibria apply here, though; they make you impossible to predict, but also make the prediction level of the opponent irrelevant, in that any possible prediction by the opponent, so long as it's plausible (as in, counters something you have a chance of doing), leads to the same outcome on average; I wonder if trying to use psychology on prediction would work better than the purely random method? Quote:
|
||
|
|
|
|
#30 |
|
Fast-moving, smart, sexy and alarming.
![]() ![]() ![]() ![]() ![]()
Join Date: Aug 2005
Posts: 5,152
|
On the issue of teams: A team building AI would essentially be a completely different program. I'm not making any assumptions about what type of team the AI is using. That part is interchangeable.
__________________
Previously obi. Technical Machine, a Pokemon AI. "Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat." - Sun Tzu |
|
|
|
|
#31 |
|
Join Date: Nov 2007
Posts: 23
|
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?
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. 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. 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)? |
|
|
|
|
#32 |
|
Join Date: Sep 2009
Posts: 786
|
I once wrote a few basic minmax algorithms for simple games but I'm real rusty and never did ones involving chance.
Anyway, I was thinking that the complexity of he weighting system could be reduced by making most conditions penalties or bonuses for Pokemon rather than having intrinsic value. IOW, the value of the a Pokemon is reduced in proportion to the damage it takes from Stealth Rock or a Swift Swim Kingdra gets a bonus from rain. So the AI might choose to use Rain Dance on turn one because all its Swim Swimmers get a boost that maximizes the next state. Or it might choose to use SR because the advantage given to every Pokemon on its team (maybe even a higher bonus for phazers) outweighs the numerical benefit from fainting the opposing lead. One question this approach brings to mind is how the AI would evaluate the opponent's Rain while knowing only one Pokemon, the lead. It could do so by assuming there are a certain number of rain abusers and boosting the value of the opponent's unknown Pokemon accordingly. As a result, the AI might take the opponent's turn one Raindance more seriously than its use later by Uxie when it knows Uxie is the only thing left. 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. In that case, for the AI to play strongly, it might have to make initial assumptions about movesets and the probability of certain Pokemon being present. For example, it would have to recognize Stealth Rock as a very likely move for a lead Aerodactyl that results in a very poor state for it in the presence of Charizard, Salamence and Gyarados on its team and possessing a Scarf Froslass, it would choose to Taunt. It could probably play quite satisfactorily just knowing learnsets but if it new shoddy moveset statistics it might be even more convincing. Anyway, I'm kind of just brainstorming here and I don't know if I'm being particularly useful but you have motivated me to think about or try some approaches. |
|
|
|
|
#33 | |||
|
Join Date: Jun 2007
Posts: 387
South Australia
|
Quote:
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. Quote:
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. Quote:
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. |
|||
|
|
|
|
#34 | ||||||
|
Fast-moving, smart, sexy and alarming.
![]() ![]() ![]() ![]() ![]()
Join Date: Aug 2005
Posts: 5,152
|
This thread has been mostly a "general AI questions thread", so I'm modifying the title to say so.
Quote:
Quote:
Eventually, I might do something smarter than that, but this seems like a good start that will tend to be mostly accurate. Quote:
Quote:
![]() Quote:
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. Quote:
__________________
Previously obi. Technical Machine, a Pokemon AI. "Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat." - Sun Tzu |
||||||
|
|
|
|
#35 |
|
ACUPRESSURE
Join Date: May 2007
Posts: 1,508
Cambridge, England
|
I've thought about programming a Pokémon AI before, too. I think that's currently beyond my capability, though (and would take me forever to finish).
Anyway, I was considering allowing it to learn over several battles, rather than just use logic independently in each one. For example, it would keep track of switch-ins to each of its team members; if it found that a common switch-in to, say, Magmortar was Blissey, it would either give Magmortar a move to counter it (Cross Chop) or switch out accordingly to a Blissey counter. Obviously, this wouldn't work without major modifications (if it just switched to a counter for common switch-ins every time, it wouldn't get anything done), and it would require a lot of battles for it to learn what to do. However, this leads on to my next point. Each time it faced a player, it would record their team and general strategy (stall, offensive etc) based on the game. Much like a human player might, it could then recall the information next time it faces the player (e.g. if they don't normally use Blissey, there's no point switching in a Blissey counter). I'm sure many people are roughly familiar with the playing styles of more prominent battlers, so why couldn't an AI do the same? Finally, it would be great if the AI's settings could be tweaked (assuming it gets a public release). For example, you could set it to a defensive style, or make it take more risks. If the AI is decently fast, you could even get it to tweak its team if something is doing badly, and run it against itself (maybe with different settings) many times; this could lead to some interesting decisions (and new sets). The only drawback is that it would become optimised to play against itself, and may end up getting worse against human players... |
|
|
|
|
#36 |
|
Fast-moving, smart, sexy and alarming.
![]() ![]() ![]() ![]() ![]()
Join Date: Aug 2005
Posts: 5,152
|
The self-play strategy was used to great success in TD-Gammon, a Backgammon playing program that uses neural nets to modify its own behavior. That is far beyond my ability to program, however.
My vision has always been to have it learn from battles. Ideally, it would use the general stats for some information, and then slowly modify that based on its own (more detailed) information.
__________________
Previously obi. Technical Machine, a Pokemon AI. "Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat." - Sun Tzu |
|
|
|
|
#37 |
|
ACUPRESSURE
Join Date: May 2007
Posts: 1,508
Cambridge, England
|
That bit was more directed at the AI's team. Looking back, I just saw that you're not going to implement any team building, so I guess you can skip over that bit.
Even if you're not implementing complete team-building, maybe you could still allow it to make small changes to its current team? It might help people with team building, as they could assign their team to the AI, then have it simulate many battles and see if anything could be tweaked. That might not be feasible time-wise, though, as you'd probably need to do in the order of hundreds or thousands of games. On that topic, it would be interesting to have access to everyone's Shoddy teams, so you could run a virtual ladder (assuming it's feasible). I'm not sure what information could be gained, though (maybe which teams are best, assuming all players have the same amount of skill). EDIT: Also, are you going make the source available to the public? I'd certainly be interested in adding a better AI to my game project :P |
|
|
|
|
#38 |
|
Fast-moving, smart, sexy and alarming.
![]() ![]() ![]() ![]() ![]()
Join Date: Aug 2005
Posts: 5,152
|
I will most likely be releasing the source under the AGPLv3+ (Affero General Public License version 3+) some time in the next few months. This is the same license that Shoddy Battle is distributed under.
I do plan on having the AI be fully self-sufficient. That is to say, I will at some point have it make its own teams, but that's much farther down the list. My thinking is that team building is a more complicating thing to do than battling (as long as the team isn't just a derivative work of other teams), and you can battle without really knowing too much about team building, but you can't build a team without knowing how to battle.
__________________
Previously obi. Technical Machine, a Pokemon AI. "Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat." - Sun Tzu |
|
|
|
|
#39 |
|
Join Date: Aug 2009
Posts: 363
Memphis, TN
|
Let me preface this post by saying that I am a game theorist, not a programmer, and I have never studied algorithms in the computer science context.
That said, it seems like ideally, with unlimited data and computing power, plus perfect information, the program would use an extended-form game tree and simply choose the move with the largest number of remaining victory conditions. By taking this move each time, the AI would always win. The addition of a move by nature ("God" in your model) makes this a probabilistic game, but this is still the ideal strategy. Of course, Pokemon has two obstacles to this method: too many variables and incomplete information. So if I am understanding your "score" for each node, it is basically supposed to be an estimation of the full extended-form game. Using the information available and remaining within the bounds of reasonable calculation times, we are making our best guess as to which node has the most remaining subsidiary victory conditions. This node is the payoff-dominant move. Because it is a simultaneous-move, imperfect-information game, this is often, as you say, a mixed equilibrium, since there is some small incentive to deviate from a strict-move or strict-trigger strategy. This view of the model produces some additional insights. For example, you can remove the evaluation of any variables which no longer impact the number of extant victory conditions. You have already suggested doing this by ceasing to evaluate entry hazards when only one Pokemon remains. This could apply in other contexts also. For example, if your opponent's last remaining Pokemon is Scizor, and you have a Scarf Heatran on the field, you can ignore the Scizor's current HP for the calculation, since even a max/max Scizor with Occa Berry cannot survive even a min-damage Fire Blast. There are numerous other circumstances in which you might ignore variables in this way, including many scenarios involving Pursuit, for example. This may also provide insight into the relevance of field effects such as weather, Gravity, and Trick Room. In general, visible information about the opposing team should provide at least some ability to guess at its capacity for abusing the effect. Normally, a rain team will want to keep Rain Dance up as much as possible, since even an opposing team with a random Kingdra will have far less ability to abuse the rain. Of course, the utility goes back down if the opponent has a Vaporeon. Usage statistics could provide a guess as to how much good rain can do you, weighted gradually less as additional information is revealed about the opposing team, until the calculation is entirely empirical. For example, let us suppose that the AI's active Pokemon on turn t is Ludicolo, Modest @ Life Orb with Surf/Grass Knot/Ice Beam/Focus Punch and standard EVs, at 90% health, and the rain ends after it scores a kill. The AI's remaining team is standard SD Kabutops and Electrode @ Damp Rock, the only thing left with Rain Dance. The opponent has just switched in a Muk, at 60% with only Brick Break revealed in its set, and has a Magcargo and an unrevealed Pokemon. The AI has two real choices here. It can use Surf on Muk, or it can switch to Electrode and go for Rain Dance. With its Focus Sash intact, Electrode can definitely get rain up. But, if the opponent's last unrevealed Pokemon is Kingdra, Electrode's ability to outspeed without rain and use Thunder may be essential to winning. Ludicolo's Surf is a 2HKO on any common spread for Muk, but nearly all Muks carry Brick Break so it is impossible to determine the set. If Muk is running attack EVs and Gunk Shot, as many do, it can OHKO Ludicolo. There is also a small percent chance that a Curser could KO with Poison Jab + Shadow Sneak. Therefore, the AI should weigh: probability based on both usage and teammate statistics of Kingdra usage, the likelihood that the opponent has Kindgra (this is really the probability that the unrevealed Pokemon can defeat both Ludicolo and Kabutops in the rain, it's just that Kingdra is the only common Pokemon able to do this); probability based on moveset statistics that Muk has Gunk Shot; probability that Poison Jab + Shadow Sneak will kill Ludicolo. With ballpark statistics for these three things, it should be easy to hazard a very good guess as to which move is payoff-dominant in the extended-form game. If the last Pokemon is known, you simply drop the first calculation and replace it with the probability, if any, that the remaining Pokemon will benefit from the rain and that this potential benefit could be outcome-determinative.
__________________
Diamond FC: 1505 4243 2479 |
|
|
|
|
#40 | |||
|
Join Date: Nov 2007
Posts: 23
|
Quote:
Quote:
Quote:
Finally, if you have anything else that is somewhat presentable, could you post that (even if it is just a representation of what the game tree will look like)? Sorry to bug you about posting stuff, but it is sort of hard to comment in vague generalities .
|
|||
|
|
|
|
#41 |
|
Join Date: Jul 2008
Posts: 805
Mirrodin
|
Im completely math computer illiterate, but can the computer compensate against player styles. Some players I find use "prediction" more, enter into more high risk reward situations could the AI punish them for that or change its playing style to accommodate for team matchup weaknesses: "wow that infernape looks dangerous how can i best mitigate it as a threat?". I realise it is early days, but A would this be possible and B would this be something you would consider implementing. I often find this crucial to success so it may be integral to this program.
On a different tact. I'm in absolute awe of this and eagerly await any and all outcomes of this undertaking.
__________________
<&GEC> crazy dont like you baby Kiss my bloodclot!
yeah you know what i mean |
|
|
|
|
#42 |
|
Join Date: Aug 2007
Posts: 409
|
The way I would make this AI is begin with the "hardest" setting possible, by allowing it to "cheat":
Give it a set of teams with immunities to as many types possible, as well as some some way to beat the game "easily" such as with Tank Offense, All-Out Offense, or Stall. ALLOW IT TO SEE THE OPPONENT'S MOVE TO SEE WHAT CHOICE THE OPPONENT HAS MADE BEFORE IT MAKES A MOVE (this is the only "cheating" aspect), all the members of the opponent's team, and knowing how much damage it would take/critical hit beforehand and have it respond accordingly. If the opponent is gonna switch to a Steal Type, have it use a fire move, if your opponent uses a fighting attack, have it switch to Rotom, etc. Start with this aspect of the AI first, since hard counters (if/then commands) will probably be the most basic thing to program. From this point, you can begin developing the AI into "easier" difficulties by having it not look at the opponent's moves every couple turns. For example: 0 will be it will look at the opponent's move every turn, at level 1 there'll be a 99% chance that it'll see the opponent's move, at level 2 there'd be a 98% chance, etc. all the way up to 100 where it wouldn't see the opponent's move at all and rely completely on the evaluation function. From this point you will develop the evaluation function as to what would be the best move when it does not know what the opponent is going to do, and Endgame scenarios This is my theory anyway, and how I would go about it if I were making a Pokemon AI. Starting with Hard Counters/"cheating" AI first as the most difficult setting would probably be the easiest way to get this AI project started. With the large amount of if/then commands to come up with if you go along with the "Hard Counters" idea, make it so that it does a good job playing 1 team really well first, and then you use that experience to get a better idea of how to build the AI from there. Essentially, begin with an all-knowing omniscient AI that will always make the "Perfect" move with a given team and, with your experiences, work your way down from there. I think this would be the best method of developing this AI quickly since you're attempting to write an AI for a strategy game from essentially scratch, and that's very, very hard. Though it may not be as hard if you took a look at Nintendo's AI for their higher-tiered Computer-controlled trainers and figured out how it works and explaining it to us.
__________________
An example of Deadpool's personality: http://i47.tinypic.com/b6bz4o.jpg LOOK AT IT! Former #1 Uber Battler on Smogon: http://i49.tinypic.com/o50xzk.jpg Last edited by XtrEEmMaShEEn3k2; Apr 8th, 2010 at 9:57:47 PM. |
|
|
|
|
#43 |
|
Join Date: Oct 2009
Posts: 3,358
England
|
I'm not sure cheating will teach you anything useful really.
Also, poking around Nintendo's code is a no-no - quite apart from being of dubious legality of itself, it opens you up to claims your own AI code infringes copyright.
__________________
"If I may guess, Emboar might be an exception to the norm that the scalding liquid is expelled from the Pokémon's mouth" - Cobraroll, on Emboar learning Scald. "Nothing like a cup of tea to start off the day" - Professor Oak, EP025. |
|
|
|
|
#44 |
|
Join Date: Apr 2010
Posts: 1
|
It would be pretty cool if Nintendo upped the sophistication of their AI though, however obi definitely deserves financial compensation for his work if they do include it :P.
I've done a bit of work before in AI, and I'm curious to know why you chose to write it in C++ rather than a functional language such as LISP, which is better suited to the task (At least in my own experience)? |
|
|
|
|
#45 |
|
Join Date: Apr 2010
Posts: 1
|
the book blondie24 does a good job describing an evolutionary learning function. i'd end up using that, for a team at the beginning i'd assign every neural net a "random" team that was pregenerated. i'm sure there are more than enough pregenerated teams you could use.
the other option is to go with setting each status condition with positive and negative values. this however would require you to watch your game play and to note "dumb" moves the neural net does. |
|
|
|
|
#46 | |
|
Join Date: Jun 2007
Posts: 387
South Australia
|
In regards to assigning values for the AI to use, maybe it would be best to have them all be variables and for the AI to alter them if it wins or loses. For instance if you assign a value of 3 to Stealth Rock, but its not paying off that much, the AI would lower its value until its payoff it equal to the amount of priority placed on using SR. That said I can see these value probably best being a per-team thing, as obviously something like TSpikes is useless to some teams and very useful to others.
Quote:
|
|
|
|
|
|
#47 |
|
Join Date: Aug 2009
Posts: 363
Memphis, TN
|
Sure, but that doesn't change that it's the payoff-dominant strategy. No matter how you change the rules, your best strategy is always to choose the node with the most remaining victory conditions. The entire discipline of game theory revolves around simplifying and estimating this process.
__________________
Diamond FC: 1505 4243 2479 |
|
|
|
|
#48 |
Join Date: Dec 2009
Posts: 3,268
|
I honestly know hardly anything about programming and I don't think I've ever fully understood one of your posts obi, but perhaps you could put your work in progress AI against some very skilled competitive people, and have it attempt to mimic them? It's just a thought
|
|
|
|
|
#49 |
|
Join Date: May 2010
Posts: 16
Varies
|
I am 'somewhat' knowledgeable in the fields of both programming and the logic being used here (meaning that I'm better than everyone I know, but I don't really know anyone who's any good), but I have noticed a few things about the problem that bear thinking about. First off, I agree with what Res Ipsa Loquitur about the problem with basing things off HP (and sorry if you addressed this already; I must have missed it), and after thinking about it awhile have decided that the best way to weight that sort of thing would be with a measure of 'KO-ability', given your current team (perhaps the weighted average of the number of moves each of your Pokemon needs to KO, with the weighting against those of your pokemon unlikely to survive and in favor of those likely to be out against it. This needs to be thought out further, obviously). I also think that Pokemon should be evaluated in terms of a percentage rather than a number, because that lets you use infinity (for a Pokemon which guarantees victory, perhaps) rather than just really big numbers. I don't think that it actually matters though, except from a stylistic point of view.
Also with regards to what people have been saying about prediction and base point values for moves (which would of course be modified by things like STAB, weather, etc.), I thought of something that I'm not sure would work (not knowing enough about the programming language you're using) but would be useful if it did. First include some variable in all of the various estimates (how likely are they to switch out? How much intrinsic value does Ice punch have?) so that instead of '30%' we had '30% + N'. Now, after every battle where that statistic comes into play, pick a random N between say, -5 and 5. Over many battles, if substantially more wins occur with an N of 3-5 (in relevant situation) then change the range of Ns to 0-10, and so on. You could probably calculate this continuously, perhaps decreasing the bounds of the range by .1% for each win with a low N and increasing by .1% for each win with a high N. Someone might have suggested something like this earlier, I'm not sure. Another note on prediction: something interesting to see would be if different people with similar skill predict in different ways, either based on their personality or with simple(?) randomness. Give two people a copy of the program, and check their 'N' values after a few hundred battles, and see whether and how they are different. This could also show whether different instances of essentially the same scenario (I need to guess whether he switches in fear of a S.E. hit or stays in in fear of a different S.E. hit) are predicted the same, or if some variations exist which change the optimal percentages (the only thing I can think of is maybe with different S.E. types in this case; maybe Ice is always better than ground?). I think that using some variant of the above (thats two paragraphs ago) strategy would be necessary, or at least more helpful than recorded statistics. I mean, when we get the data from Shoddy it just says absolute usages; for all we know a ton of the starmie usage was on one day, and most of the time it would have rated 19. And as previous statistics have made obvious, it is next to impossible to predict anything for the future based on these statistics until its already happened. The numbers jump around from month to month, and I wouldn't be at all surprised if they jumped even more from day to day. Normally there would be no way to get around that, but if this AI were widely used, it would be gathering huge amounts of data constantly on its own, not enough to predict the future, but probably (hopefully) enough to get a handle on the present. Of course, that's just my opinion. I also have a suggestion in regard to how Pokemon are rated. I agree that the sum of the scores of the moves should play a part, but I think that, in keeping with the idea I presented earlier, any further alterations (due to sandstorm, type advantage, STAB, etc) should be multiplicative, probably removing a percentage of the difference between the Pokemon's other value and 1 (a Kingdra which already has two dragon dances would not gain as much from rain as would one with no other boosts). Finally, I disagree somewhat with the analysis of taunt you present. You suggest that it heavily de-value the non-attacking moves of the target, not dropping them to zero because the status isn't permanent. I say that it should drop them to zero, but only on the turns it is in effect. I may be misunderstanding what you are saying, but you seem to have forgotten that you have intermediate nodes to work with, not just a static score (in this case, by my reasoning, the non-attacking moves would be absolutely de-valued for every turn until it switches out, curing the status and fully restoring the moves' scores. With nodes perhaps looking like: 100 (not taunted), 10 (taunted), 10 (stayed in), 100 (switched out)) I stand by each thing I said above, though I would guess at least three quarters of it is probably worthless. I hope some of the good stuff helps, and more importantly that none of the stupidity hurts. Good Luck |
|
|
|
|
#50 |
|
Join Date: Jan 2009
Posts: 651
University of Maryland
|
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.
__________________
"Paper working as intended. Nerf rock." -Scissors "Give a man a fish, you'll feed him for a day. Give him access to the internet and he won't bother you for weeks." |
|
|
| Thread Tools | |
|
|