In a network sim, who runs enemy AI

If I have an application that involves a number of players, but also involves a number of computer controlled enemies. Who exactly runs scripts for the enemy’s AI. Does only one client get picked to do this in a peer to peer setup? Does a non player unity server run this, that the players connect to?

It’s programming - you get to choose.

Usually a server will do this, so as to discourage cheating. But it’s up to you.

And in a typical, unity client/server network setup, the server is just another instance of unity running a slightly different scene?

That’s the most common way to go about it, you can run unity in something called “headless” mode (start it with -batchmode) which allows unity to run without drawing any graphics, etc. (saving a lot of performance) which is how you run your server.

You can also build your own server (which most AAA-games do), the need to do this varies with the type and scale of the game you’re building.