Reflection:For this blog, I had decided to omit week 7 as that was a break week from class. For week 8, we started learning the second part of Group AI called wolfpack then proceeded to learning GOAP (Goal Oriented Action Plan). We also learned about spatial partitioning. Week 9 was mostly studio work and consultations. We didn’t go too deep into the group AI Wolfpack. We watched a video that showed two scenarios of wolves hunting. The first part showed a wolf chasing a very fast hare on its own. The hare was well adapted to fast pursuits and could change directions without struggling. The wolf is also adapted for fast pursuits and is arguably faster than the hare could not keep up with the hare’s quick direction switch, eventually giving up, allowing the hare to escape and live another day. The second video shows another chase but this time, two were three wolves chasing the hare. This is where the wolfpack behavior comes into play: one wolf will chase after the hare while the other stays close by and prevent the hare from escaping if it changes directions. This ended in a more successful chase for the wolves. We watched a short GIF right after and showed a larger pack of wolves attacking a bear mom and her cubs. One or two more of the wolves would fake an attack while another wolf at the bear’s blind spot would go in for the actual attack. Our lecturer showed this to us in a small simulation. I need to do more research on it but the basic gist of this is that there will be a main class, possibly called the pack manager, that will handle the commands for every individual wolf, but each wolf will have their own behaviors individually. Immediately after wolfpack, we covered GOAP or Goal Oriented Action Planning. I still need to do more research on this, but it was explained as another way to utilize A-star pathfinding. I have done some research, but, as I said, it’s not enough. “Goal oriented action planning is an artificial intelligence system for agents that allows them to plan a sequence of actions to satisfy a particular goal,” (Owens, B., 2014). However, the goal isn’t the only factor the GOAP takes into consideration. GOAP planning takes in the total cost it takes to do a task, the state of the world (the objects present, the tools available) and the agent (Owens, B., 2014). This adds to the realism of the AI. If there were more than one agent tasked with a similar task, the outcome would be much different. GOAP is generally used to add realism to the AI that a behavior manager like a Finite State Machine. As of now, that’s all I know for GOAP. The next thing we learned was spatial partitioning in the weekend class. Spatial partitioning is actually a great design patter to couple with A-star pathfinding and GOAP since it deals heavily on AI interaction while on a larger battlefield-like map. The basic gist of spatial partitioning is that the space/map around is divided or separated into smaller sections, and these sections can be split into even smaller sections and so on and so on. The reason for this is plainly explained in the article on Spatial Partition over at gameprogrammingpatterns.com – “Efficiently locate objects by storing them in a data structure organized by their positions.” (Nystrom, R., n.d.). The benefit of this design pattern is that it allows programmers to bring down the big O notations O(n) or O(n²) to “something more manageable,” (Nystrom, R., n.d.) since it takes into account the reason for using this pattern – big battlefields. The more units there are, the more calculations and checks will be needed to perform actions. Take the example of one army charging another. Without spatial partitioning, every unit in Army A would be calculating for nearby targets in every unit in Army B. With spatial partitioning, each unit in A will only make checks for B units in their own partitions. Of course, this is only if one’s dealing with a significant number of units. The only issue is that it’s very difficult to do this if the units are moving. As of now, that’s all I know for spatial partition for now. I will definitely do more research to further better my understanding of this pattern. Studio Team: Week 7 ha no progress as our team decided to take it as a break week and I took that time to simply research more on the topics that we discussed in class. But for these two weeks, the studio team compiled all the work we did and pushed on source tree into the main testing laptop (my laptop) and set up the VR kit to hopefully test the VR functionalities. We found that our VR interaction system was still lacking, but we did manage to set up other parts of our game like our enemies and turret targeting system. It was during these weeks that my A-star pathfinding code worked properly and was integrated and tweaked so it could us a Scriptable Object to store some values and add functionality to one of the main classes it relies on. We also changed where the designer could change the tower type for the game’s defenses. Instead of changing the tower, we simply changed the bullet so when we spawn the tower as a normal tower, the designer can just set the bullet prefab to a type that the tower will fire and attach it to the turret’s bullet game object. Reference(s): Owens, B. (2014, April 23). Goal Oriented Action Planning for a Smarter AI. Retrieved December 20, 2019, from https://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793.
Nystrom, R. (n.d.). Spatial Partition. Retrieved from https://gameprogrammingpatterns.com/spatial-partition.html.
0 Comments
Leave a Reply. |
Categories |