Clarification about minor issues with Lab 5

10 novembro 2016, 17:59 João Miguel Dias

Two things I would like to clarify about Lab5.


1) In the DepthLimitedGOAP class, there is an Actions property and ActionPerLevel property. This leads to some confusion. The Actions property corresponds to the original list of all actions, while ActionPerLevel is what you're supposed to work with to store the actions down a path in the search. When I created the class I was thinking I would need the original list of actions, but actually it isn't needed. To avoid confusion, remove the Actions property.

2) There is a bug in the SwordAttack action. The line: 
worldModel.SetGoalValue(AutonomousCharacter.GAIN_XP_GOAL,xpValue-this.hpChange); 
should be:
worldModel.SetGoalValue(AutonomousCharacter.GAIN_XP_GOAL,xpValue-this.xpChange);