{"id":51639820,"url":"https://github.com/kai9987kai/diamond-sim","last_synced_at":"2026-07-13T18:04:05.944Z","repository":{"id":258754256,"uuid":"875654677","full_name":"kai9987kai/DIAMOND-SIM","owner":"kai9987kai","description":"This repository hosts an advanced implementation of the DIAMOND Simulation—a dynamic, interactive model that demonstrates how agents navigate, learn, and adapt within a complex and ever-changing environment. Built with HTML5 and JavaScript, the simulation leverages modern web technologies for an engaging visualization and interactive experience.","archived":false,"fork":false,"pushed_at":"2026-06-25T19:57:20.000Z","size":220,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-25T21:20:08.936Z","etag":null,"topics":["diamond","diamonds","simulation"],"latest_commit_sha":null,"homepage":"http://www.kai9987kai.co.uk/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kai9987kai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-20T14:53:33.000Z","updated_at":"2026-06-25T19:57:25.000Z","dependencies_parsed_at":"2024-11-15T09:15:58.578Z","dependency_job_id":null,"html_url":"https://github.com/kai9987kai/DIAMOND-SIM","commit_stats":null,"previous_names":["kai9987kai/diamond-simulation","kai9987kai/diamond-sim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kai9987kai/DIAMOND-SIM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai9987kai%2FDIAMOND-SIM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai9987kai%2FDIAMOND-SIM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai9987kai%2FDIAMOND-SIM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai9987kai%2FDIAMOND-SIM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kai9987kai","download_url":"https://codeload.github.com/kai9987kai/DIAMOND-SIM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai9987kai%2FDIAMOND-SIM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35430963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diamond","diamonds","simulation"],"created_at":"2026-07-13T18:04:05.026Z","updated_at":"2026-07-13T18:04:05.938Z","avatar_url":"https://github.com/kai9987kai.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository hosts an advanced implementation of the DIAMOND Simulation—a dynamic, interactive model that demonstrates how agents navigate, learn, and adapt within a complex and ever-changing environment. Built with HTML5 and JavaScript, the simulation leverages modern web technologies for an engaging visualization and interactive experience.\n\nKey Features:\nGrid-Based Environment:\n\nA 2D grid representing the world state where each cell holds a reward value.\nStatic Obstacles: Fixed barriers that agents cannot pass through, adding complexity to navigation.\nDynamic Obstacles:\nMoving Obstacles: Obstacles that change their positions over time, requiring agents to adapt their paths dynamically.\nRandom Obstacles: Obstacles that appear and disappear randomly during the simulation, simulating an unpredictable environment.\nTraps: Special cells that reduce the agent's reward when visited, encouraging agents to learn to avoid them.\nTerrain Types: Cells with different terrain (normal, slow, fast) affecting agent movement speed and strategy.\nAdvanced Agent Modeling:\n\nMultiple Agents: Support for simulating multiple agents (up to 10), each with unique identifiers and colors for differentiation.\nAgent Strategies:\nRandom Movement: Agents move in random directions.\nGreedy Search: Agents move towards neighboring cells with the highest predicted rewards.\nQ-Learning: Implementation of a basic Q-learning algorithm allowing agents to learn optimal policies through experience.\nLearning Algorithms:\n\nQ-Learning Implementation: Agents use Q-learning to update their policy based on rewards received, balancing exploration and exploitation.\nPrediction State: Agents maintain an internal prediction of the environment, updating it based on observations and learning rate.\nDiffusion Process:\n\nDynamic Environment: Cell values diffuse to neighboring cells over time, simulating processes like heat distribution or scent dispersion.\nAdjustable Diffusion Steps: Users can control how rapidly the diffusion process occurs.\nInteractive Visualization:\n\nWorld Canvas: Displays the current state of the environment with color-coded cells indicating reward levels, terrain types, and obstacles.\nDynamic Obstacles Visualization: Moving obstacles are animated, and traps are visually distinct, enhancing the simulation's realism.\nPrediction Canvas: Shows each agent's internal prediction of the environment.\nAgent Representation: Agents are visualized as colored dots with trails showing their movement paths.\nReal-Time Updates: The simulation updates in real-time, reflecting changes in agent positions and environment dynamics.\nUser Controls:\n\nSimulation Controls: Start, stop, reset, and step-through functionalities.\nParameter Adjustments: Real-time control over diffusion steps, learning rate, agent speed, agent strategies, and the number of agents.\nInformation Panel: Displays detailed statistics for each agent, including position, accumulated reward, steps taken, and prediction accuracy.\nData Logging and Analysis:\n\nSimulation Data Log: Records agent data at each time step for post-simulation analysis.\nPerformance Metrics: Calculation of average prediction accuracy across agents.\nAccessibility of Data: Logged data can be accessed via the browser console for further examination.\nEducational Value:\nThis simulation serves as a powerful educational and experimental tool for:\n\nUnderstanding Agent-Based Modeling: Observe how individual agents make decisions based on different strategies and how these decisions affect their performance in a dynamic environment.\nLearning Reinforcement Learning Concepts: Explore the basics of Q-learning and how agents learn from interactions with their environment, especially when facing dynamic obstacles and traps.\nVisualizing Diffusion Processes: See how values propagate through a grid over time, influenced by obstacles, terrain, and environmental changes.\nExperimenting with AI and ML Algorithms: Modify parameters and strategies to see firsthand how changes impact agent behavior and learning outcomes in complex settings.\nGetting Started:\nClone the Repository:\n\n\n\n\nUse the on-screen controls to adjust parameters.\nClick Run to start the simulation or Step to advance one step at a time.\nObserve how agents interact with the environment, navigate dynamic obstacles, and learn over time.\nFuture Enhancements:\nAdvanced Pathfinding Algorithms: Implementing algorithms like A* for more sophisticated agent navigation.\nEnhanced Learning Models: Incorporating more complex reinforcement learning models like Deep Q-Networks (DQNs).\nMulti-Agent Interactions: Introducing cooperation or competition between agents to study emergent behaviors.\nUser Interface Improvements: Adding graphs and charts for better visualization of agent performance and learning curves.\nData Export Options: Allowing users to download simulation data for external analysis.\nContributing:\nContributions are welcome! If you're interested in improving the simulation or adding new features:\n\nFork the repository.\nCreate a new branch for your feature or bug fix.\nSubmit a pull request with a detailed description of your changes.\nLicense:\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkai9987kai%2Fdiamond-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkai9987kai%2Fdiamond-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkai9987kai%2Fdiamond-sim/lists"}