ryanxcv
  • ryanxcv
  • Advanced Member Topic Starter
2013-06-23T05:28:41Z
I like to find problems with the AI by just playing through several games and seeing how it acts.

I can see the cards that it plays and decide whether the plays it makes are good, but what about the cards that it doesn't play?

I would like to be able to see the AI's hand, similar to how it is in replay mode, so I can see whether it has made the best decision.

Is there a like of code (maybe in utility.lua) that I can modify to do this?
laithnimri123
2013-06-23T06:07:18Z
Originally Posted by: ryanxcv 

I like to find problems with the AI by just playing through several games and seeing how it acts.

I can see the cards that it plays and decide whether the plays it makes are good, but what about the cards that it doesn't play?

I would like to be able to see the AI's hand, similar to how it is in replay mode, so I can see whether it has made the best decision.

Is there a like of code (maybe in utility.lua) that I can modify to do this?




good idea but i am pretty sure that when percival18 realesed the debug vesion we could see the card (codes but we cant use it any more couse percival18 added ai to the ygopro main launcher so just wait beside the coder (yetterb)
is oflline for 2 weeks [:cry:]



wish i helped
FAD!
  • FAD!
  • Advanced Member
2013-06-23T13:54:00Z
When I want to test I stack both my deck and the AI's in the deck editor and check "Do not shuffle decks" before the duel. That way, I can pretty much guess what the AI has. Of course, if you want to test the AI in random situations that might arise in a duel this won't help. Unless you shuffle both decks in the editor, check "Do not shuffle decks" and remember the cards. Still, something that shuffles the AI's deck (a search card?) will destroy your setup...
Percival18
ryanxcv
  • ryanxcv
  • Advanced Member Topic Starter
2013-06-23T23:28:54Z
Originally Posted by: Percival18 

Use the puzzle mode in the debug version



I would like to be able to easily test the AI in random situations. Puzzle mode only works for testing specific cards, and even so it is easier to just tell it not to shuffle.
Percival18
2013-08-26T15:48:50Z
Add the following code in your ai script to reveal all cards.

function OnStartOfDuel()
	local e1=Effect.GlobalEffect()
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_PUBLIC)
	e1:SetRange(LOCATION_MZONE)
	e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
	Duel.RegisterEffect(e1,0)
end

Snarky
2013-09-06T07:50:27Z
Originally Posted by: Percival18 

Add the following code in your ai script to reveal all cards.


function OnStartOfDuel()
	local e1=Effect.GlobalEffect()
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_PUBLIC)
	e1:SetRange(LOCATION_MZONE)
	e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
	Duel.RegisterEffect(e1,0)
end



This is very helpful and I use it a lot. However, apparently, it causes some gameplay issues. I noticed this when testing Infernity, I couldn't use Infernity Archfiend's effect to special summon itself when being drawn while I had no cards in my hand. Made a stacked test deck to confirm, and indeed, as soon as you use this trick to reveal the AI's cards, you yourself cannot use the effect of Infernity Archfiend anymore.

My guess would be, that you cannot pay the cost to reveal the Archfiend to your opponent, because all cards are already revealed. If this is true, it might cause issues with other decks that reveal cards as well (Mermails, Spellbooks, Koaki Meiru... ), however, I didn't test that so far.
Snarky
2013-09-10T11:48:17Z
I tested other cards with reveal effects, and it does indeed affect many, if not all, cards that reveal a card to your opponent as a cost. You cannot activate any card effects requiring such a cost, so if you are testing the AI with their cards face-up, be aware of that.
Users browsing this topic