π Studio-in-Flux
Spatial AI by William Martin
GSAPP 2024β2025 | Columbia University
Part A β Real-World Setting

Document the Space


Location: GSAPP 600N Studio, Avery Hall
Environment


Obstacles


Entities


Agents

Circulation

π‘ How is the circulation affected by the change in the following rules between the agents and the environment?
Part B β Spatial Concept
"The GSAPP architectural design studio exists as an oscillating field, where space is in constant negotiation between structure and spontaneity. As a striated space, it is gridded with desks, pinned-up drawings, and structured critiques, imposing order and discipline. Yet, within this framework, smooth space emergesβfluid movement, impromptu discussions, and iterative design processes disrupt the grid, fostering creativity. This interplay transforms the studio into a form of Ba, a knowledge-mobilization space where collective intelligence thrives through cultural exchange and shared experimentation. ε (Wa) manifests in the delicate balance between collaboration and individual exploration, ensuring that both coexist within the studio's spatial rhythm. Following Bruno Zevi's framing, the studio is not merely a backdrop for work but an evolving stage where movement, dialogue, and intervention shape its essence. Finally, it embodies Void & Presence, where empty desks hold potential, and spaces between conversations define the invisible yet powerful currents of thought and design."
Part C β Semantic Model
π§± ENTITIES β
















π RELATIONSHIPS β




















π ACTIONS β








π RULES β








You are a logical engine assigned to the following semantic model and ontologies. You can only respond to queries and actions in accordance with these definitions.
Entities & Attributes
- studio: total_area (sq ft), grid_resolution (ft/tile), number_of_divisions (int), entry_points (list of coordinates), exit_points (list of coordinates)
- division: division_id (string), boundary_coordinates (list), assigned_desks (list of desk_ids), assigned_chairs (list of chair_ids), is_accessible (boolean)
- desk: desk_id (string), size (width Γ height, ft), location (top-left coordinate), orientation (horizontal/vertical), assigned_chair (chair_id), interaction_duration (seconds), is_occupied (boolean)
- agent: agent_id (string), type (student/professor/TA), current_position (coordinates), current_division (division_id), movement_state (entering/moving/waiting/seated/interacting/exiting), assigned_task (visit_desks/group_work/observe/explore), assigned_chair (chair_id), current_desk (desk_id), interaction_timer (seconds), path (list of coordinates)
- path: waypoints (list of coordinates), start_point (coordinate), end_point (coordinate), current_step (int)
- heatmap: grid (2D array of ints), max_visits (int), last_updated (timestamp)
- chair: chair_id (string), location (coordinate), assigned_desk (desk_id), is_occupied (boolean), is_movable (boolean)
Rules
- Each desk is assigned exactly one chair, and vice versa.
- A chair must be placed within 3 feet of its assigned desk.
- An agent may only interact with a desk while seated on its assigned chair.
- During interaction, the agent's movement_state is "interacting" and a countdown timer tracks interaction_duration.
- While a desk is occupied, it cannot be used by another agent.
- Agents may only move through unoccupied, walkable grid tiles.
- Agents must maintain a 3ft clearance between one another when moving.
- A division may only contain one desk arrangement type (row, column, cluster).
- After interacting with their required number of desks, agents must exit the studio.
Actions
- An agent may "enter" the studio through an entry point.
- An agent may "move" toward a target location.
- An agent may "sit" in a chair.
- An agent may "interact" with a desk for
interaction_duration
seconds. - An agent may "stand" and vacate the chair.
- An agent may "exit" through a designated exit point.
Part D β Computational Model
The computational model forms the backbone of the Studio-In-Flux simulation, translating spatial rules and agent behaviors into a dynamic, interactive environment. This section breaks down the simulation's architectureβfrom initialization and environment setup, through the main simulation loop and rendering, to user feedback and reset logic. Whether you're a designer, developer, or curious observer, you'll gain a clear understanding of how the studio's logic is encoded and visualized step by step.
Workflow Diagram
flowchart TD Start([Start]) LoadUI([Load UI & Scripts]) InitVars([Initialize Global Variables & UI Controls]) SetupEnv([Setup Environment]) CreateGrid([Create Grid]) PlaceDesks([Place Desks]) InitAgents([Initialize Agents]) SetEntryExit([Set Entry/Exit Points]) MainLoop([Main Simulation Loop]) HandleInput([Handle User Input/Events]) UpdateState([Update Simulation State]) UpdateAgents([Update Agents]) UpdateHeatmap([Update Heatmap]) UpdateStats([Update Statistics & Scores]) Render([Render/Display State]) Draw([Draw Grid, Desks, Agents, Heatmap, Legends]) UpdateUI([Update UI Elements]) CheckEnd([Check for End Condition]) PauseReset([Pause/Reset/Restart?]) Reset([Reset Simulation]) LoopOrEnd([Loop or End]) Start --> LoadUI --> InitVars --> SetupEnv SetupEnv --> CreateGrid SetupEnv --> PlaceDesks SetupEnv --> InitAgents SetupEnv --> SetEntryExit SetupEnv --> MainLoop MainLoop --> HandleInput --> UpdateState UpdateState --> UpdateAgents UpdateState --> UpdateHeatmap UpdateState --> UpdateStats UpdateState --> Render Render --> Draw Render --> UpdateUI MainLoop --> CheckEnd CheckEnd -->|No| MainLoop CheckEnd -->|Yes| PauseReset PauseReset -->|Reset| Reset --> MainLoop PauseReset -->|End| LoopOrEnd
1. Initialization Phase
- Load UI:
index.html
loads, attaching scripts and styles. - Global Variables Setup: Simulation parameters, grid, agents, desks, UI controls, statistics, and heatmap variables are initialized.
- Setup Functions:
setup()
: Initializes the simulation environment, UI elements, and event listeners.setDefaultEntryExit()
,setDefaultEntry()
,setDefaultExit()
: Set up entry/exit points for agents.
2. Environment & Agent Preparation
- Grid Creation: 2D grid representing the studio is created.
- Desk Placement:
placeDesksInDivisions()
: Desks are placed according to user-selected arrangement and division. - Operator (Agent) Initialization:
- Agents are created with assigned desks and initial positions.
findValidSpawnPoint()
: Determines valid spawn points for agents.
3. Main Simulation Loop
- Loop Control: Driven by animation frame or timer.
- User Input Handling: UI controls (sliders, buttons) and mouse events (
mousePressed()
) allow user to modify parameters, pause, reset, or interact with the simulation. - Simulation State Update:
updateOperators()
: Each agent senses the environment, computes the next move (using pathfinding like Dijkstra), and updates its state (position, interaction with desks, exit).findNextMove()
,findPathWithDijkstra()
,isValidMove()
: Pathfinding and movement logic.updateHeatMap()
: Tracks and updates the heatmap of agent movements.calculateMoveCost()
: Computes movement cost for pathfinding.
- Statistics Update:
updateStatistics()
: Updates stats like desks interacted, operators completed, etc.calculateLayoutScores()
,calculateEfficiencyScore()
,calculateSpaceUtilizationScore()
,calculateComfortScore()
: Computes layout and performance scores.
4. Rendering/Display
- Draw Functions:
draw()
: Main rendering function, called each frame.drawGrid()
,drawDivisions()
,drawDesks()
,drawOperators()
,drawEntryExitPoints()
,drawHeatMap()
,drawHeatMapLegend()
,drawTrailLengthLegend()
: Visualize the environment, agents, heatmap, and legends.
- UI Updates:
updateScoreDisplay()
,updateSliderLimits()
,updateValues()
: Update UI elements and feedback.
5. Output & Feedback
- Display Results: Visual feedback, statistics, and scores are shown to the user.
- User Interaction: User can pause, reset, or modify the simulation and see immediate feedback.
6. Termination/Restart
- End Condition: Simulation can be paused, reset, or restarted by the user.
- Reset:
resetSimulation()
: Resets all variables and restarts the simulation.
Part E β Artificial Intelligence Methods
Tool: GPT-4o via Funkify
- Text-to-Text Reasoning
- Interpreted the semantic model and spatial rules
- Answered questions about circulation and layout
- Explained the impact of changing parameters (e.g., divisions, desk orientation)
- Function Calling
- Called custom functions like
update_simulation()
,collaboration_potential()
,evaluate_circulation()
, andcalculate_layout_score()
- Called custom functions like
Future Scope:
- Screenshot Interpretation
Tool: GPT-4o with images- Analyzed simulation screenshots
- Described spatial behavior and circulation patterns visually
- The simulation can be 3D
- We can simulate two cases - one in which agents cannot move chairs, and one in which they can and compare the results using LLM.
- We can find circulation impact when agents have different goals - to work individually vs in a group, to interact with desks, or to work at their desks, etc.
Part F β Working AI System (Simulation)












Part G β Summarize Learnings
π Learnings from the SimulationβLLM Integration
We set out to investigate how circulation within a studio space is affected when we change the rules and relationships defined in a semantic model. Specifically, we focused on varying:
- Number of spatial divisions
- Location of entry and exit points
- Orientation of desks (row, column, cluster)
- Created a detailed semantic model describing the studio environment, entities, attributes, relationships, actions, and rules.
- This model served as the foundation for all logic, simulation, and reasoning tasks.
- Asked natural language questions about the space.
- Tested LLM interpretation of the semantic model.
- Changed studio parameters and queried the LLM about circulation under new configurations.
- Developed a function to evaluate circulation in text form.
- Created a layout scoring function (numeric score based on fragmentation, access balance, desk arrangement).
- LLM could evaluate circulation in text, but numeric scoring required explicit data.
- Defined a function to calculate average agent distance (theoretical, needs real simulation data).
- Concluded that real agent paths must be generated by the simulation and passed to the LLM for accurate evaluation.
- User defines an intent (e.g., "make circulation smoother").
- LLM interprets intent, updates simulation parameters.
- Simulation runs, generating spatial outcomes (agent paths, congestion).
- LLM reads results, interprets circulation, and suggests further changes.
- Tested by asking questions about simulation screenshots and changing agent agency (e.g., allowing agents to move chairs).
- β The semantic model must reflect what we intend to test.
- β Funkify is effective for reasoning and mapping function requirements.
- β οΈ The LLM can't compute without data, but can reason hypothetically or guide data generation.
- βΉοΈ The simulation must feed results (agent paths, congestion, timings) back into the loop for the LLM to make sense of it.
- β The AI system can autonomously interpret results, recommend adjustments, and identify optimal configurations for circulation.