Social science PhD candidate at Leiden University. Did Bachelor and M.Phil. in Physics. Doing research in social modeling and simulation. Open source contributor and game developer.
Many social science researches use agent-based modeling (ABM) to explore the outcome of social mechanisms in hypothetical scenarios. Taking this one step further, it would be interesting to simulate interstellar societies. Under any interstellar scenario, physics tells us that we should at least consider special relativity. For example, there is a time delay constrained by the speed of light, and a moving agent experiences a time dilation effect. Since conventional simulation toolkits are not suitable for this specific scenario, we have created our framework in Kotlin, "Relativitization". We have constructed some models and a turn-based strategy game based on the framework.
In this talk, we will share our experience in utilizing Kotlin and its ecosystem for our social simulation framework. We try our best to keep this "purely Kotlin": kotlinx-coroutine for parallelization, kotlinx-serialization for copying/loading/saving data, dataframe for analyzing the output, ktor for the server-client architecture of the game, etc. Of course, sometimes it is unavoidable to rely on Java dependencies, like we choose libGDX for game GUI, and it integrates well with Kotlin. We believe our case shows that Kotlin is reasonably mature, performant, and user-friendly for social scientists who work in the discipline of social simulation.