top of page
Search
Writer's pictureAbish Neel

Week 4: Basic AI Foundation

Updated: Jul 7, 2023


This week I began ideating and researching about how to go about implementing AI for a game like FIFA. Since football/soccer is a team sport, making the AI cohesive and cooperative is extremely important and in order to do so I decided to make an AI coordinator which can send commands to individual agents/players after considering parameters based on all the other players' states. What this would lead to is a coordinated group of players, similar to the real game.


The first route I planned to go was to take almost an A* pathfinding approach in which the weights of individual nodes are affected by how close an opposition player is to it, which in turn drives teammate AI players to move away from such nodes in order to open themselves up for passes. However after a few more hours of research and implementation, I decided this was quite expensive (updating the weights for each node every time a player on the field changes position) and maybe overkill.


Instead I chose to implement vision cones where each individual AI player is responsible for recording information regarding their surroundings and reporting it back to the AI Coordinator. The coordinator can then make decisions as to where players need to move if the passing lane to them from the player with the ball is obstructed by an opposition player.


AI Coordinator logic which receives information about the opposition player obstructing the passing lane and suggests a location to move to in order to move to a better position.


With the current architecture, the AI coordinator can take in many more parameters in order to make smarter choices, which are going to be based on proximity to goal, space on the flanks, space between teammates etc.


Vision cones that help individual players scan their surroundings for opposition players.

First pass where player recognize obstructing opposition and move to positions where they can receive passes easier.


This week was slightly less productive as a lot of my time was spent in researching how to go about implementing such a complicated, coordinated AI system. I also switched away from the weight based nodes approach which consumed some time as I switched towards vision cones for perception. However, this foundation seems pretty solid as I can expand upon it and make AI more coordinated and complex by taking in many more parameters than it is currently. That is what I will be working on in the upcoming weeks.


4 views0 comments

Recent Posts

See All

Comentários


bottom of page