It is currently 12 Dec 2018, 04:53
   
Text Size

Infinite Loop: Pause for Reflection

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, CCGHQ Admins

Infinite Loop: Pause for Reflection

Postby ShivaFang » 21 Sep 2018, 15:44

I'm seeing an infinite loop in AI vs AI battles - I think the card is Pause for Reflection but I can't be certain (it's a GRN card certainly - I'm only running GRN at the moment.)

This seems to be the part of the code that the AI uses to determine whether to block or use the fog effect - but convoke is confusing it.

Edit: I've since 'banned' Pause for Reflection and the error no longer appears - I am reasonably sure it is this card.

Code: Select all
Game-0 > java.lang.StackOverflowError
   at java.util.regex.Pattern.<init>(Pattern.java:1351)
   at java.util.regex.Pattern.compile(Pattern.java:1028)
   at java.lang.String.split(String.java:2380)
   at java.lang.String.split(String.java:2422)
   at forge.game.zone.ZoneType.listValueOf(ZoneType.java:49)
   at forge.game.combat.CombatUtil.getAttackCost(CombatUtil.java:280)
   at forge.game.combat.AttackRequirement.<init>(AttackRequirement.java:92)
   at forge.game.combat.AttackConstraints.<init>(AttackConstraints.java:79)
   at forge.game.combat.Combat.<init>(Combat.java:77)
   at forge.ai.ComputerUtilCard.getLikelyBlockers(ComputerUtilCard.java:524)
   at forge.ai.PlayerControllerAi.chooseCardsForConvokeOrImprovise(PlayerControllerAi.java:956)
   at forge.game.cost.CostAdjustment.adjustCostByConvokeOrImprovise(CostAdjustment.java:262)
   at forge.game.cost.CostAdjustment.adjust(CostAdjustment.java:240)
   at forge.ai.ComputerUtilMana.calculateManaCost(ComputerUtilMana.java:1139)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:91)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:55)
   at forge.ai.ComputerUtilCost.canPayCost(ComputerUtilCost.java:507)
   at forge.ai.ComputerUtil.hasAFogEffect(ComputerUtil.java:1350)
   at forge.ai.AiBlockController.assignBlockers(AiBlockController.java:1016)
   at forge.ai.AiBlockController.assignBlockersForCombat(AiBlockController.java:939)
   at forge.ai.ComputerUtilCard.getLikelyBlockers(ComputerUtilCard.java:539)
   at forge.ai.PlayerControllerAi.chooseCardsForConvokeOrImprovise(PlayerControllerAi.java:956)
   at forge.game.cost.CostAdjustment.adjustCostByConvokeOrImprovise(CostAdjustment.java:262)
   at forge.game.cost.CostAdjustment.adjust(CostAdjustment.java:240)
   at forge.ai.ComputerUtilMana.calculateManaCost(ComputerUtilMana.java:1139)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:91)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:55)
   at forge.ai.ComputerUtilCost.canPayCost(ComputerUtilCost.java:507)
   at forge.ai.ComputerUtil.hasAFogEffect(ComputerUtil.java:1350)
   at forge.ai.AiBlockController.assignBlockers(AiBlockController.java:1016)
   at forge.ai.AiBlockController.assignBlockersForCombat(AiBlockController.java:939)
   at forge.ai.ComputerUtilCard.getLikelyBlockers(ComputerUtilCard.java:539)
   at forge.ai.PlayerControllerAi.chooseCardsForConvokeOrImprovise(PlayerControllerAi.java:956)
   at forge.game.cost.CostAdjustment.adjustCostByConvokeOrImprovise(CostAdjustment.java:262)
   at forge.game.cost.CostAdjustment.adjust(CostAdjustment.java:240)
   at forge.ai.ComputerUtilMana.calculateManaCost(ComputerUtilMana.java:1139)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:91)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:55)
   at forge.ai.ComputerUtilCost.canPayCost(ComputerUtilCost.java:507)
   at forge.ai.ComputerUtil.hasAFogEffect(ComputerUtil.java:1350)
   at forge.ai.AiBlockController.assignBlockers(AiBlockController.java:1016)
   at forge.ai.AiBlockController.assignBlockersForCombat(AiBlockController.java:939)
   at forge.ai.ComputerUtilCard.getLikelyBlockers(ComputerUtilCard.java:539)
   at forge.ai.PlayerControllerAi.chooseCardsForConvokeOrImprovise(PlayerControllerAi.java:956)
   at forge.game.cost.CostAdjustment.adjustCostByConvokeOrImprovise(CostAdjustment.java:262)
ShivaFang
 
Posts: 100
Joined: 25 Jun 2016, 01:15
Has thanked: 26 times
Been thanked: 3 times

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 5 guests

Login Form