Inspiration
The problem with modelling human behaviour is that it is complex, unpredictable, and highly dependent on the interaction platform.
Our project aims to abstract away from specific details of the human world, by designing an evolving society which transcends all medium. It models both behavioural patterns at an individual and society level using multi-fidelity LLM prompts and Claude's API.
Our approach allows individuals to communicate via natural language text. Their communication shapes the culture of their respective societies, in order to simulate evolving behaviour and ideologies at a society-level over time.
What it does
By creating a meta-representation of human societies, we were able to concisely describe the state of the world, and the relationships between different individuals and societies.
This allowed us to efficiently batch the information as a set of ActionRequests, which were sent to Claude's API simultaneously to determine the next best action for each individual in real time.
The results updated both our meta-representation of human society, and the individual and society-level behaviour (represented with Markdown files).
We found that this was able to exhibit incredibly interesting behaviour. For example, individuals become suspicious of specific individuals from other societies, and there were large societal cultural shifts across the course of the simulation in response to actions taken by other societies.
In order to show that these meta-representation were precise enough to model real-world behaviour, we used this information to simulate civilisations in two environments with completely different types of interactions: Paint2D and Minecraft.
How we built it
At every tick, we compiled the following information for each individual:
- A world description, describing the general environment and actions that individuals can make
- The relative position of all other players and settlements to the individual
- The culture of the society that the individual belongs to (as a Markdown file)
- The individual's current memory and behavioural patterns (as a Markdown file)
We sent this information to Claude, which processed the information using its 'congnition module' to return back a set of actions to be taken by each individual. Such actions include moving to new locations, communicating with other players, and attacking other players or settlements.
Communicating with other players, especially those from other societies, was the most interesting interaction as it updated both player's behavioural patterns after the encounter (by updating their Markdown files). Every 100 ticks, we update the society's culture based on the new memory and behaviour patterns of all individuals in the society (updating the society's cultural Markdown file).
Haiku was used for large-scale low-fidelity actions such as movement, where Sonnet was used for less-common high-fidelity actions such as communication which required much more thought and insight from the LLM. We found this to be a effective compromise at producing interesting emergent behaviour, whilst running the model in real time.
Challenges we ran into
Running the simulation in real-time was a goal of the project. This was challenged by the large latency overhead of calling LLMs over an API, even after significant optimisations. We considered running models locally, but this would limit the intelligence of the model we had access to.
We solved this by placing the model in charge of a broader scope of the task, and less so the explicit individual tasks. This allowed us to keep the required intelligence needed to develop this emerging behaviour and also allow us to run the program in the short period of time we had available.
Accomplishments that we're proud of
We were pleased to have observed interesting results. They showed us a promising developing society which successfully simulated both unavoidable conflict and harmonious actions.
Our work-around for the slow API came at a late stage of the Hackathon, but we managed to adapt and overcome.
What we learned
We learned a lot about the sensitivity of ever-changing ecosystems. We scaled our simulation up to 30 agents and observed how quickly the complexity grew even in this small experiment. It was a good opportunity to utilise the Claude models we would not normally have access to and genuinely observe the difference in intelligence between them that made them more or less suitable for certain use cases.
What's next for I did it Con-way
We hope to interface with different games and mediums to observe how the same behaviours manifest when placed in a completely new environment and faced with stronger or weaker competition. Eventually taking these concepts to attempt to model social conflicts in real-world situations.
Built With
- aws-bedrock
- claude
- javascript
- minecraft
- node.js
- pygame
- python
- vite
Log in or sign up for Devpost to join the conversation.