Developer Diary
This page tracks my daily thoughts and experiences on my journey to build the SimWorld simulation engine and implement a complex system model that will emerge societal dynamics via granular simulation of people situated in a simulated world
Day 1 (Monday, 2024-04-11)
I am committed to build an actual working Prototype of what I now dub "SimWorld", also in the spirit of an MVP, minimal viable product. Something tangible that can run and be presented to others, instead of me just talking about the idea. My goal is by end of 2024 to have this MVP working, and that after that my focus will be on iterating enhancements, improvements etc.
My first developer "sprint" is to scope the deliverables and work to be done, as there is:
Set the vision and scope, the high-level definition of done for end of 2024.
Canonical World Model, to drive the features the simulation engine needs to support.
Architecture of the Simulation Engine - Features, Components, Data Structures, Process Flows, APIs
Technical Platform to implement all this on (e.g. Unity, programming language, OS/Cloud?)
Research and Study on Engine and Model implementation methods, options, standards
Documentation of requirements (stories) and dev/test specs.
Actual working code that executes and does something
Track record of decision flow for architecture, features, implementation choices (be deliberate, accountable) - what, why, how,
definition of success
So far I am just a "one man" team, so I need to maintain discipline in decision making, accountability, and transparency, for myself, and others I may end up collaborating with. Make the process and its checkpoints transparent!
In the interest to make progress, stay pragmatic on course, to achieve something tangible...
start small
improve iterative (agile)
frequent checkpoints with "running code"
use modular approach, to minimize refactoring
just-do-it to get going, optimize later
abstract, use patterns, as details may change
self-documenting code/data
Day 2 (Tuesday, 2024-03-12)
Inspired by a conversation with Peter about my implementation approach to SimWorld, I landed on the decision to use NetLogo as the initial simulation platform, to enable rapid prototyping beyond just textual description of concepts, relationships, and dynamics in a Wiki.
Furthermore, to capture the high level model concepts, I am considering using the System Dynamics model capability in NetLogo before jumping into cellular automata and agent-based modeling.
Spent the day experimenting with NetLogo, refamiliarizing myself with the NetLogo programming language. Discovered "CogLogo" plugin, for simulating mental processes in agents.
Day 3 (Friday, 2024-03-15)
Played with NetLogo 3D sample models from library.
Downloaded Protege OWL editor, for semantic triple editing (knowledge capture, to deduct logic from). As a possible way to capture SimWorld logic (?)
Took more copious notes on thoughts around agent modeling, and using a message-passing event bus to coordinate agent/world states, to decouple changes in data structures from agent behavior.
Day 4 (Saturday, 2024-03-16)
Built several NetLogo base models for PoC, all prefixed SimWorld24...
Aquarium 2
Land Critters
Agent Life Cycle (most interesting so far, a micro-sim with multiple agents, simulating age and health decay)
Started coding event logic into Agent model
Day 5 (Sunday, 2024-03-17)
Largely ad-hoc coding in NetLogo. Here are some documentation notes inline from NetLogo Code-Tab...
;; CONSIDERATIONS for future implementation...
;;-----------------------------------------------
;; Ailments increase with advanced Age
;; - use Age (in relation to life expectancy) as modified/amplifier for any erosions on Energy, Stamina, Health-Temp, Health-Base
;; - model Agent States, Variable Levels, Events that convert Variable Levels into States
;; Vital Levels: Health-Base, Health-Temp, Energy, Stamina, Illness, Attention, Stress, Fear, Anger, Sadness, Pain, Pleasure, Sedentary,
;; Events
;; States (defined via Vital Level variable and thresholds, interpreted and triggered by corresponding Events)
;;
;; Architectural Approach: separate the events, from the Level update logic, from the consequences (state transitions, and their impact on Vital Levels) - make it modular and logic tractable
;; .... balance Logic Chain in one place, vs. all Change Logic centrally accessible
;;
;; NUTRITION CYCLE - Make Food-Intake dependent on eating trigger (hungry threshold, social eating, bored eating, frustration/stress eating, sugar/alcohol dependency)
;; Change from current push-food at fixed intervals, to pull-food, whenever agent feels like (conditions/triggers see above)
;;
;; Introduce concept of "VELOCITY" / Rate of Change / Flow-Rate in the dynamics of Vitals vs. Events (a throttle in terms of frequency & probability)
;;
;; NEED SOME NOTION OF TIME GOING BY, THAT CANNOT BE USED FOR ANYTHING ELSE WHILE SLEEPING -- Exception: Resting, can also be in parallel with some other activities
;; (or get Stamina recovery bonus from certain activities?)
;;
;; Consider modeling age-effects, both inhibitory (speed, stamina, healing rate) and amplifying (wisdom, patience, intelligence)
;;
;; General Model Architecture improvements ....
;; Cleaner separation/distinction betweenm internal and external events and stubbing Agent interface to world
;; Crisp and consistent Framework for State Transitions: from-to, transition threshold & probability (prob. as parameter?)
;; Distinction of linear and non-linear transition dynamics (better understanding and documentation of expected transition behavior)
Need to catch up Wiki documentation with what has evolved in Code. Many good considerations and ideas have emerged while coding a running model.
Effectively have implemented a rudimentary Discrete Event system, driven by dynamic levels of Agent Vitals, Thresholds, and consumption/replenishment Rate variables (a bit of System Dynamics logic there too, I suppose)
Day 6 (Saturday, 2024-03-24)
I have put the NetLogo hacking on hold, in favor of looking at the Unity 3D engine. So I spent the week examining it, trying to learn its capabilities, watched countless explainatory and demo videos.
I think the Unity engine is a viable platform choice for the ultimate full-fledged simulation. It can do everything NetLogo does, even if much of the ABMS infrastructure would have to be coded from scratch (unless there are packages available?).
Next, I want to test how Unity performs over NetLogo with large agent populations, and complex agent behavior.
I should spec out precise requirements, which then can be implemented on both platforms, for comparison.
Day 7 (Monday, 2024-03-25)
Learned about the Wave-Collaps Function usable for procedurally generated landscape.
Also, Cube-Marching algorithm, to procedurally create unique worlds by combining predefined components/tiles based on pre-defined rules. Oskar Stalberg of Townscaper fame had a lot to share about that, and he used it successfully in his games.
Yesterday I also coded another NetLogo model, a crude landscape, based on land, forest, mountains, water, and individuals roaming the land, based on simple rules, affecting their speed or navigation choices.
Today, plan on prototyping an event system in NetLogo. Spec out the purpose and features of this Event System in a Wiki article, before coding!
Reconsidering General Approach:
I have been focused so much on various aspects on different levels, mixing up features, implementation, aspirations, vision, versus diving in implementing something technical.....
Also, much of my emphasis in the vision and the modeling/design has been on the complex system, emergent behavior aspect, the self-evolving nature of the simulation/game, that I need to start focus on the underpinning architecture, the pre-defined, tangible, stable part of the implementation, that allows for evolution and emergence to happen (in a tractable way, which is the whole point, that the player can always understand why things are happening the way they emerged).
I need to define an architecture and process, that a) defined the structure and predefined micro-behavior of the components, while b) being able to calibrate the possibly chaotic micro-behavior with desired (somewhat bounded) macro-outcomes. If the outcomes are too chaotic and far removed from the real world, people might not be able to relate, or even comprehend what is going on.
Day 8 (Thursday, 2024-03-28)
Haven't really been focused on implementation. Largely taking more conceptual notes still. Learned more about the Unity engine. And dinked around with NetLogo (the simple world map navigation model).
Considering rebooting the NetLogo model with more realistic landscape algo, and resource dynamics, and more focus on the evolution of the anthroposphere.
Day 9 (Monday, 2024-04-01)
Have done a lot of study, taking notes (on paper), and hacked together various models in NetLogo, while largely offline from this Wiki. Need to catch up with capturing my findings, learnings, and refined ideas.
One of the things I honed in on is the "construction kit", the key components of my framework for SimWorld24, from an implementation perspective, the concepts, the patterns, the approach to the model.
Day 10 (Thursday, 2024-04-04)
Still spending most of my time learning the tools and methodology, mostly of visualizations and using the design and game engines. Discovered MagicaVoxel, which is like CAD/Blender for Voxel-based CG, including sophisticated materials and lighting. Found out that lighting is more important in visual expression than the pixel resolution. Still taking copious notes on my approach, model design, and engine realization. MUST update my Wiki with all these insights, and streamline it bit back into useful layout and material, so there is a guiding thread throughout it all.
Today, I want to try out another NetLogo model, in which I do not focus on the patch/visualization window as center, but use it as a dynamic canvas to display different types of contextual information, while the main model runs non-visually in data structures, which can be visualized on demand. Almost wish I could have multiple NetLogo canvases (patch grids). Have to look into using the NL math extension, which has 3D matrices. Also, focus more on an event-based system for managing the complexity of the state transitions and their interactions, at least in this early conception stage, even if later things are supposed to be more agent-based.
WIKI Cleanup Goals:
separate concerns: the what, how, why, when (sequence)
distinguish features from capabilities, process from end-goal, abstract from concrete
but link it all back together in a coherent narrative
move from extreme focus on ideation towards working on actual results, progressively achieving a real thing
sketch out more of user experience
separate out ideation from prescription (scratchpad versus committed definitions)
Day 11 (Saturday, 2024-04-06)
I spent a lot of time overthinking the approach, and am in the process of re-organzing the wiki along a more refined, and focused kind of thinking, toward my vision and the implementation approach. Considerable thought today went into project orgnanization, strategically, and tactically, in recognition of the complexity, uncertainty, and being a single person team that has to do it all. It is easy to get lost in the weeds with all these ambitions and moving parts, that I felt some more structure, as guard rails and guiding markers would be useful.
I also setup a parallel Wiki on SlimWiki, "S24" for now, that is supposed to be a more concise version of the more ideation-focused one here.
Also considering writing up a concise version (white paper format?) in German, due to the opportunity to German speaking audiences, struggling with the English-language terminology. And it forces me to be more focused and concise with the core concepts and thoughts.
I also came up with a framework to allow for unlimited scope ideation, while mitigating scope-creep. It allows to capture all aspects of scope, without committing to implementation timing (if at all) without losing the generally good ideas.
My overall project organization framework is made up in the same combinatorial/dimensional way as the spirit behind SimWorld24 in the first place.
Need to focus on
a) settling on a game engine for 2024 scope, especially for the rapid prototyping during sprints! (to deliver concrete functional software)
b) architecture for enabling combinatorial emergence - meaning, components, with connections, and constraints, both on the type of connections, the target connections, and the emerging phenomena (boundaries) so the emergence makes sense to the observer (controlled environment, the emergence for now is just an illusion to the observer, and tightly managed under the covers)
Day 12 (Tuesday, 2024-04-09)
Proof of concept that I can link external .net DLLs into Unity and access them from C# scripts in Unity. Cool!
Day 13 (Thursday, 2024-04-11)
Hit a bit of a wall. As I tried to start implementing a rudamentary C# application in Visual Studio, by building an OOP class library, I ran into so much red tape and boiler plate requirements that it pulled me out of my creative zone. I find C# having too much friction, distracting me from the actual model/simulation logic I am trying to implement. I feel like I need a more focused DSL (domain specific language) to keep focused on what I am actually planning to do. NetLogo as a programming language has much less friction, perhaps an inspiration?
Should I really focus on developing a DSL on paper, and then see to implementing that on top of a mainstream programming language? A precompile of sorts?
Day 14 (Thursday, 2024-05-02)
This dev log entry is a place holder for my unchronicled activity the last 2 weeks.
I have been traveling to see family in the US. Have intermittently studied SimWorld related concepts and brainstormed, but not done much development. Some note-taking on paper.
Mostly thought about how to architect the Sim Engine.
I am very adamant about two things...
a) enabling fractal complexity, starting simply and adding capability by filling in details (but not changing fundamentals)
b) totally isolating the technical aspects (compute platform/language constraints) from the world model/simulation, so as to not cause spillover effects where technical constraints are visible in the world simulaton
Day 15 (Sunday, 2024-05-12)
Back to brainstorming implementation method/platform...
I wonder if I am better served to use an AI/LLM architecture as the core platform for SimWorld (to implement the simulation engine). It could still be complemented with simulation platforms like SDM, DES, ABMS.
In the end, with focus on complex people, a learning model will have to be implemented anyway. So why not use generative AI to help with the world generation and evolution. Plus, I could train it with the text that I write up for the Wiki anyway. I would "Raise" (train) my own AI with my thoughts and plans, and this would take care of the struggle I have to concretely technically implement something tangible. The creation would be done by the AI based on my training, prompting. This seems to be mature technology at this point, so I should find an open source implementation for GenAI/LLM and start training it with my ideas and see how I can use it to manifest my sim world. If in the beginning I am content with a text-adventure UX, then ChatGPT does this already (with other training data). And visual generation is also happening, perhaps not in the world building sense, but I am sure it could be adapted from merely creating pretty pictures/animations to building complex systems based on core rules. If nothing else, I could be pioneering AI/Complex Systems interfaces/tools?
Day 16 (Sunday, 2024-06-30)
When I state here "Day 16", I mean the day I journaled. Obviously I have done lots of things in the meantime on the project, mostly ideation and note taking. Many of my notes are on paper. But I have also started separate Wikis here on SlimWiki, specifically IDEATION, DESIGN, PLANNING, IMPLEMENTATION
Lots of my ideation and brainstorming went into how to approach architecture, to allow for iterative, progressive growth of complexity in implementation, which I refer to as "fractal complexity" (similar in concept to LOD in video games).
Also, I have just today realized that I have spent too many thoughts on the world around the main actors of the story: people. My simulation/game is supposed to focus on social complexity, but I have not spent much focus on how to implement these creatures, arguing that their genesis from the big bang is more important. Is it really?
How about I focus on implementing Agent_0 (Epstein) first, and only create stubs of world features around it as needed? Grow the world backwards in implementation from the start focus of that first person prototype (and its deviations to create a society from)
Day 17 (Tuesday, 2024-07-02)
Started coding another C# based class library, with mockup simulation objects (based on my aspired world model). Considering agile hacking together the model in code, instead of lengthy text descriptions.
Learned to use .NET 8, instead of old .net Framework. Managed to create a stub prototype of a console app calling a C# .net class library successfully, with getter/setter properties. Have to step back and think through the design of the class library, statically encoding my preliminary world model. And how to set it up so it can grow fractally in complexity.
Day 18 (Friday, 2024-07-05)
Yesterday I successfully ran the ultimate first raw prototype, scoped to the first iteration of a rudimentary time impulse giver feature. OOP model so far includes SimEngine, ModelWorld. Today updated the logic from method calls to C# pub/sub event logic, tested hourly time advance between SimEngine and ModelWorld.
Today plan on refactoring the relationship between SimEngine, ModelWorld, and make use of SimConfig, to own the instantiated Model objects.
Day 19 (Monday, 2024-07-15 4am)
Drafted up DSL spec for SimVM...
https://docs.google.com/document/d/1jCsA3yxV5QJVSlqo81jn74OTH5ZuWXARPPwxMozKX3I
NEXT STEPS:
code OOP library to manifest this functionality, based on the MVP Object Model as scoped:
SimEntities:
Planet, Sun, Moon, Stars/Constellations (for spirituality and navigation)
Topography, WaterLevel, Atmosphere, Climate regions, Weather Systems, Geosphere/Layers/Plate Tectonics
Landscapes, LS Features & Zones
Resource Deposits (in Geosphere)
Biomes
Water Cycle
Water Systems
Organisms
Vegetation (forests, fields, plants: fruits/veggies - for nutrition, medicine/herbal treatment, toxins, flowers: aesthetics/decoration, pollen/allergies, eco-system for insects, food for herbivores)
Creatures (roaming, basic drives, needs fulfillment, various levels of sophistication: reflexes vs. goal-seeking etc)
People (sentient, planning, language, abstract thinking)
Societies, Cultures, Civilization (overloaded term? historically loaded? avoid?)
Settlements, Paths, Infrastructure
Saturday, 2024-07-20
I spent more time with SimWorld ideation/organizing/learning than I actually chronicle.
Now that I am focusing 100% of my time on this project, I need to better organize
a) content (to be more effectively shareable, presentable)
b) my efforts, to make sure they contribute to progressing
c) my focus, in terms of scope (working towards a progressive roadmap, even in the fractal complexity iteration sense)
DONE TODAY: Drafted up Design Document, based on Kevin/BanditBloowyn's .txt template