Skip to content

The implementation of the simulations mentioned in conformity papers by Ravshanbek Khodzhimatov, Stephan Leitner, and Friederike Wall (2021-2024)

Notifications You must be signed in to change notification settings

hojimat/NKnorms

Repository files navigation

thiNK framework for ABM

This is an agent-based simulation codebase for an organization with multiple interacting agents based on an NK framework by Stuart Kauffman (1991).

Summary

The model heavily focuses on the social norms emerging from the interactions and sharing of knowledge among agents, and thus features networks. In that regard, this model combines NK framework with the Network Theory.

Platform

The code is written in Python using an OOP paradigm that features aggregation relationship of type has_many between Organization and Agent classes, and a hidden Nature class.

Process overview

flowchart

Codebase and directory structure

The big part of the codebase is the NKPackage that contains utility commands for the comfortable NK development. The documentation for the code is not available at the moment, so it is advised to look at the comments in the code for now.

The directory models/ contains the definitions of the aforementioned classes. The files main.py and test.py contain the particular implementation, given the parameter set. The directory refmaterial/ contains the utilities and useful functions. The directory nkpack contains the newest version of the NKPackages.

The class diagram below illustrates the actual OOP structure of the codebase.

classdiag

Performance

The _calculate_global_maximum method is the slowest part of the code, as it runs through every possible bitstring and maps it to a performance. At the moment, jit is used for its underlying nk.calculate_performances command under NKPackage. Also the main.py runs a multiprocessing.Pool for faster simulations. CUDA is being considered at the moment, but without clear idea how to implement it.

Credits

The code is written by Ravshan Hojimatov. The research was done at University of Klagenfurt, Austria between 2019 and 2024 by Ravshanbek Khodzhimatov, Stephan Leitner, and Friederike Wall.

About

The implementation of the simulations mentioned in conformity papers by Ravshanbek Khodzhimatov, Stephan Leitner, and Friederike Wall (2021-2024)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published