Multiagent systems code in Python