Thread: [Essentials Script] Pokémon TCG mod
View Single Post
Old February 8th, 2013 (10:50 AM). Edited February 8th, 2013 by the__end.
the__end's Avatar
the__end the__end is offline
Pixel Artist
    Join Date: Apr 2010
    Gender: Male
    Posts: 141
    Originally Posted by Maruno View Post
    I've already added the Blackout, etc. decks that came alongside the first 3 sets (9 decks in total). As for the decks in the GBC game, some of them use cards that aren't included in this project, so they'd need to at least be altered accordingly by someone who knows more about deck-building than I. They're all listed on Bulbapedia.
    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.

    Can you tell me some cards that aren't included but are needed for a deck? Maybe i can come up with a replacement.

    Originally Posted by Maruno View Post
    Of course, the AI is going to cheat. That is, it'll make its choices while knowing about cards it shouldn't be able to know about (e.g. cards in the player's hand, which prize card is best to take, whether it'll draw something good because of Professor Oak). However, it won't influence the outcomes of coin flips or whatever, so it'll be fair that way. I think making the AI omniscient is the only way it can be made to stand a chance against players.
    You should be careful so that the "cheat" is not to obvious. :D

    Originally Posted by Maruno View Post
    As for how the AI will actually work, I have a vague idea. At the start of its turn, it looks around the duel and lists everything it is able to do (play a card from the hand, use an in-play effect such as a Pokémon Power, retreat, etc.), and then assign a desirability value to it. Calculating this value for each action depends a lot on the environment, and is the convoluted part. Once all the values are calculated, it will do the most desirable action and repeat (recalculating the values for what's left). Once there's nothing left to do, it will attack if possible and desirable - the good thing is that an attack is always the last thing in a turn (and there's always just 1 attack per turn), which makes it a bit simpler.
    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.

    Originally Posted by Maruno View Post
    It sounds simple when I write it in just one paragraph, and some actions will always be desirable (e.g. play Bill) and some will never be worth using (e.g. Mankey's Pokémon Power, as the AI will know all those cards via cheating anyway). However, when is the best time to play Energy Removal, and which Pokémon/energy should be hit by it? How about Super Energy Removal, which involves a cost to the user and may not be worth it (and if so, which card should the AI pay)? There's a huge amount of thought that needs to go into the AI for even a single effect, and I think that such thought needs to be done in order to make the AI worthwhile.
    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.

    You are right that the thoughts need to be done! But not by you alone you know. :D

    Originally Posted by Maruno View Post
    As you can see, any emergent "strategy" will depend entirely on the make-up of the deck. It can only depend on the cards you've got available ("work with what you've got"), and it's up to the AI calculations for each card to decide how useful (and therefore desirable) it is. The overall behaviour of the AI will simply look like what it does the most, which depends on what it's got (e.g. an energy-controlling strategy will appear if there are a lot of energy-controlling effects in the deck). I don't think there's any need to include deck-specific AI profiles (particularly as it would tend to rail-road and hurt decks which could sometimes benefit from profiles they don't have), and instead throw every situational calculation into the one AI used for everything.
    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?