Thread: [Essentials script] Pokémon TCG mod
View Single Post
  #129    
Old February 8th, 2013 (11:52 AM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Quote originally posted by the__end:
Yeah the list is on Bulbapedia but you shouldn't mix up the Auto Deck Machine decks with the decks not available in the Auto Deck Machine! The Auto Deck Machine decks are meant for players and the other decks for the AI. There are cards that make the AI harder to beat and cards that need a strategy which the AI cant come up with.
There is no Auto Deck Machine, so that's not a problem (and in any case, the available decks would be defined by the Machine itself). Every single premade deck, no matter how it's used or where/if it's available to the player, is defined in the same way.

I linked to that Bulbapedia page because at the bottom there's a list of every single deck in the game.


Quote originally posted by the__end:
So the AI will do anything that it is able to do before attacking? Isn't it sometimes better (smarter) if the AI skips some actions if it doesn't need to do it? For example saving an Energy card for next turn is sometimes better then putting it on a Benched Pokemon that doesn't need any more energy. Or saving Professor Oak until you have less cards in your hand.
That's all part of making the AI. It's all calculations about whether it should play a particular card. Whether it is able to play that card is only the first (easy) step.


Quote originally posted by the__end:
Energy Removal should hit the active Pokemon if it has enough energy to attack or if it will get enough energy to attack next turn. If the active pokemon will not get enough energy to attack next turn the AI chooses the pokemon with the most energy on the Bench. This is the simple way you could do it. If you want it smarter you should make it check the attack power of the benched pokemon and if they have enough energy to do this attack. If there is a benched pokemon that has a much stronger attack then the opponents active pokemon and enough energy to do this attack and if your opponents active pokemon have/will get enough energy to retreat next turn choose the benched pokemon. Which energy to choose is easier then choosing the pokemon i guess. "Color" energy should always get priority over "colorless" energy. "Color" energy that has the same type as the card should always get priority over other "color" energy.

Super energy removal should first check if you have more energy then you need in game. There is an order you can check this. First control the active pokemon. If AIs active pokemon doesn't has enough Energy to attack there is no need for other checks because you don't have enough energy.
If the active pokemon has enough energy check your bench for the amount of pokemon with energy cards. If its zero super energy removal would target AIs active pokemon and it is not worth it. If you have pokemon with energy on your bench check if you have at least one energy on your hand. If you dont you should check if your active pokemon has enough hp to survive next turn. if it has or you have an energy card on your hand there is no problem using super energy removal and choosing the weakest pokemon on the AIs bench. Colorless energy is preferred to pay of course.
I only mentioned those cards to give an example of how there's a lot of calculations involved in deciding whether to use them; I wasn't actually looking for help with them right now. However, your large paragraphs show that there are a lot of things to consider.

I disagree with your last sentence, though. The only Colorless energy is Double Colorless, which can be very useful (for any Colorless Pokémon, or Charizard, etc.). I'd say figuring out if there's an excess card anywhere is a good place to start (the level of emergency can allow alternatives, of course).


Quote originally posted by the__end:
Yeah an AI that can handle any situation is much better but much more complicated as well. I thought a deck-specific AI is more intelligent and easier to do and that is why i suggested it. After all the AI can't use any other deck then the specific decks you give it. And any prefabricated deck you can give the AI has most likely a strategy that would benefit that deck. Instead of hoping the AI comes up with the strategy itself you can guide it a little right?
Possibly, but you'd need to do it over and over for each AI profile (not the entire thing, of course, but significant amounts). I imagine strategy is the hardest thing to make an AI do, and that it's probably actually easier to let it deal with each card on its own merit rather than teach it how to follow a strategy. There's the added bonus of being able to adapt to changes in the game, such as shifting to an aggressive style when you can afford it (e.g. when you could win by being aggressive rather than following a stall-type AI profile).

The one big thing needed for creating a half-decent AI is testing. That means the game itself needs to work first, so I can throw out a release and let you all report on how the AI worked (noting any particular cleverness or stupidity), which then lets the AI be modified and improved. This is one of the reasons I'd like to concentrate only on one AI rather than a variety. It's also easier to troubleshoot.
__________________