system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How video game developers make the “computer” players and how they make them different skill levels.
gpt
A video game is a simulation. You have a list of objects and you update those objects at an interval. Each object has multiple scripts attached to it and each script runs when the game updates. They basically look at what the game is like now and determine where it should be next. A simple example is a moving object. The script in charge of moving the object applies the objects speed and calculates the next position based on the last position

&nbsp;

For an AI you write scripts that make decisions based on the current list of objects and update objects accordingly. This can be simple like "get all targets in range, then shoot the closest one". Or you can make it more advanced like "get all targets in range, prioritize based on level, then shoot the closest high priority target". 

&nbsp;

You can also define states for your AI script to be in; like "searching", "idle", "aggressive" etc. You define what criteria activates one of these states, and then write code to determine the behavior based on the state.

&nbsp;

As for difficulty you usually start with the easiest behavior you can program. In a shooter that means enemies have a ton of health, 100% accuracy and always know where you are. In a game like rocket league you just program the car to always point at the ball and drive forward. Then you just work on variations like setting a range that enemies can see you, adding randomness to their accuracy, making them keep a set distance from the player etc.