AI: Couldn't find card in fromZone (Hand)
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
AI: Couldn't find card in fromZone (Hand)
by ShivaFang » 31 Jul 2016, 16:26
I've started getting this warning repeatedly recently in my Monte Carlo AI when it simulates games. I have the nodes rebuild playable cards in hand each time and the AI was working without it. I'm not entirely sure what I did that caused this.
Is there any way to get a stack trace on it? It keeps popping up as a warning with absolutely no other information I can use.
This warning also seems to correspond with huge spikes in memory use (although that could be normal since Monte Carlo simulates many many games and creates nodes to remember results) it 'feels' like I get bigger spikes when this warning appears than when it doesn't, which is why I'm concerned about resolving it.
Is there any way to get a stack trace on it? It keeps popping up as a warning with absolutely no other information I can use.
This warning also seems to correspond with huge spikes in memory use (although that could be normal since Monte Carlo simulates many many games and creates nodes to remember results) it 'feels' like I get bigger spikes when this warning appears than when it doesn't, which is why I'm concerned about resolving it.
Re: AI: Couldn't find card in fromZone (Hand)
by LevelX » 31 Jul 2016, 21:19
Is this the exact test of the message?
I can't find such a text in the source code.
I can't find such a text in the source code.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: AI: Couldn't find card in fromZone (Hand)
by ShivaFang » 31 Jul 2016, 23:56
I'm sorry, the exact message looks more like this;
I suspect the warning is happening because the AI is trying to play a card that it doesn't actually have in hand (it simulates many games and each card it might play is one potential action.) The only time that really should be happening is if the opponent forces a discard, but it happens even when the opponent has nothing like that in their deck. And even then my nodes are 'rebuilding' the nodes available to play each time to account for something like that. This is why I would like a stack trace to try and figure it out.
Also, it used to work fine without the error messages. These just suddenly started happening.
- Code: Select all
WARN 2016-07-31 17:52:39,728 Couldn't find card in fromZone, card=Anticipate [1b7], fromZone=HAND =>[GAME 49ba96a9-6439-47fe-a24e-c5072b9b7d5b] CardImpl.removeFromZone
I suspect the warning is happening because the AI is trying to play a card that it doesn't actually have in hand (it simulates many games and each card it might play is one potential action.) The only time that really should be happening is if the opponent forces a discard, but it happens even when the opponent has nothing like that in their deck. And even then my nodes are 'rebuilding' the nodes available to play each time to account for something like that. This is why I would like a stack trace to try and figure it out.
Also, it used to work fine without the error messages. These just suddenly started happening.
Re: AI: Couldn't find card in fromZone (Hand)
by LevelX » 01 Aug 2016, 08:19
I would set a breakpoint to CardImpl->removeFromZone Line 558 to get at least a stack trace, when this happens. From this you can analyze more deeply, why this is happening.
Should be something like having not the correct game object in the context of AI simulation at that time, so the hand card the AI tries to play is not in hand.
Should be something like having not the correct game object in the context of AI simulation at that time, so the hand card the AI tries to play is not in hand.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: AI: Couldn't find card in fromZone (Hand)
by ShivaFang » 02 Aug 2016, 14:44
How would I do that on already compiled code? Or do I have to compile the whole source in order to do that?LevelX wrote:I would set a breakpoint to CardImpl->removeFromZone Line 558 to get at least a stack trace, when this happens. From this you can analyze more deeply, why this is happening.
Should be something like having not the correct game object in the context of AI simulation at that time, so the hand card the AI tries to play is not in hand.
Re: AI: Couldn't find card in fromZone (Hand)
by LevelX » 02 Aug 2016, 20:43
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest