Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been thinking about a game which would have an AI, and the AI would ideally do extensive calculations thinking many turns in advance. I am curious if there is some way to put most of the burden of the AI calculations on the client while still preventing cheating. Obviously some processing has to be done on the server, but is there a way to find some happy middle?

share|improve this question
    
Is it a multiplayer or a singleplayer game? Is there one AI which plays against all players, or does each player compete against another AI instance? When it's a multiplayer game, how close do the players interact? –  Philipp Dec 7 '12 at 9:19

1 Answer 1

up vote 4 down vote accepted

You are right that when a client does the AI calculations for its own player, it's an invitation for cheating. But what you could do, is make each client do the AI computations for randomly chosen other players.

Players could then still screw with the games of others, but as long as the computation tasks are sufficiently anonymized, there would be no incentive for them to do so. Should this still be a problem, you could send each computation task to three different random clients, and kick the one which returns a result different from the two others. That way a cheater needs at least two clients which cooperate AND be lucky enough that the server randomly assigns them the same computation task which ALSO happens to be worth manipulating.

share|improve this answer
    
+1 So, essentially, peer-to-peer. –  Nick Wiggill Dec 7 '12 at 9:55
1  
On the logical layer, yes. But on the physical layer, I would still do all the communication over the server. Having the clients connect to each other directly means a lot of additional problems to solve. NAT, Firewalls, privacy issues due to players knowing each others IP addresses etc. –  Philipp Dec 7 '12 at 10:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.