I have often wondered about this, so I do find this interesting. Of all of the info presented, one question I have is how does the AI decide when to go at a 4-way stop? In real life, I'm am constantly amazed at how confusing a 4-way stop is to humans. Not that I ever had any doubt into how complicated real-time video analysis could be, this just makes my appreciation of the complexity of the problem that much more qu…
The algorithm I apply is actually pretty simple: First at the intersection goes first. So you, individually, should let everyone who was there when you arrived go before you, but you should go before everyone who arrived after you. It gets messy when people try to be polite or don't understand the rules correctly, but otherwise it's pretty easy. It might depend on your jurisdiction, though.
Assuming cars are already at the intersection, I wait until each of them goes and then take my turn, unless it's someone's turn who wouldn't cause a conflict with me and nobody else could go at the same time and would cause a conflict with me.
When I arrive at the intersection at nearly the exact same time as someone else then some more complicated heuristics come into play (I'm not sure how you handle it when the timing is close enough to be in question). The person on a significantly larger road has priority over smaller road. People going straight have priority over right turners, which have priority over left turners, and if all else is equal, the right-most person should go first.
I guess I could sum it up as "if you can go safely, and nobody who was there before you can go safely, then go. Otherwise wait your turn", but with a lot more nuance around tie-breaking.