Whats up everybody, it has been a FULL YEAR since I final posted concerning the AI updates.
I needed to cease the work on AI in favor of so many issues, however one among them was the net multiplayer, I wasted a lot time in that rabbit gap, then got here again to AI, it nonetheless took me very very long time to discover a correct approach to implement it.
Lastly, I’ve completed engaged on the bots immediately, they serve their objective for now, individuals can check and check out the sport after they do not have anybody to play with!, the AI nonetheless wants lots of enhancements and it is positively no match for the common participant, we are going to enhance it over time hopefully, nevertheless it’s not our focus to make the AI very robust, and it is not the purpose of the sport in any respect.
I need to share with you 2 details on the AI, the unity construction, and the final algorithm.
Unity Construction:
you’ll be able to return to the submit I made greater than a yr in the past to see how it began, nevertheless, I attempted so simplify issues, no want for bushes or any subtle instruments.
https://boards.tigsource.com/index.php?subject=73729.msg1453276#msg1453276
The mind element is 2 components, the logic pipeline and the shared logic and sensor.
the pipeline as you’ll be able to see is a sequence of items of logic that execute so as, and so they share the data utilizing the mind element and get occasions from it, for example, when an enemy is close by, the mind will inform the logic components.
How does the bot typically behave ?
You possibly can see from the earlier picture that the bot works in easy steps, it decides who the present goal is, determine the place it ought to transfer based mostly on the present aggression stage, and the taking pictures logic takes care of when to shoot by checking if the goal is in sight or not.
essentially the most sophisticated a part of this complete factor is the motion half, say the AI needs to cover, what’s the greatest hiding place ?
The overall algorithm relies on islands, the AI scans the complete map at first and saves all islands, and can preserve monitor of the islands adjustments based mostly on partitions destructions.
The AI will create bins round every island of blocks, and based mostly on how aggressive/defensive it is, it decides which island to make use of as a defend or as an attacking level
It is lots of Vector math to determine what level is the most secure based mostly on all enemies places, or based mostly on the place it needs to assault.
I hope this was attention-grabbing, I needed to share my battle for the previous few months.