Corruption is a widespread, complex phenomenon with detrimental impacts on social and economic development around the world. To tackle the complexity of corruption and deterrence, agent-based models can be used to study corruption in an artificial society and explore conditions that lead to lower levels of corruption. This chapter expanded upon the work of Hammond to test the theory of general deterrence and the role of certainty of punishment on controlling corruption in an artificial environment. Our stylized fact, that certainty of punishment is a necessary component for the general deterrence of crime, was only replicated for one-shot interactions. Repeat interactions between agents reduce the certainty of punishment and corruption is therefore more likely to persist inside the artificial society. This led us to suggest that the certainty of punishment is indeed an important component of general deterrence theory. The general framework of the model can be easily expanded to explore different elements and conditions for the deterrence of corruption.