{"id":30133856,"url":"https://github.com/ortanav2/deepentropic","last_synced_at":"2025-08-10T20:12:56.076Z","repository":{"id":306343340,"uuid":"1025863968","full_name":"ortanaV2/DeepEntropic","owner":"ortanaV2","description":"A project aimed at accelerating physical simulations using neural networks.","archived":false,"fork":false,"pushed_at":"2025-08-10T10:51:32.000Z","size":58361,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T12:33:01.707Z","etag":null,"topics":["deep-learning","deep-neural-networks","machine-learning","ml","model","neural-network","physics-simulation","python","pytorch","simulation"],"latest_commit_sha":null,"homepage":"https://bwki.asai.ac.at/","language":"Python","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/ortanaV2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T23:57:05.000Z","updated_at":"2025-08-07T05:36:34.000Z","dependencies_parsed_at":"2025-07-25T05:25:51.760Z","dependency_job_id":"38ca9040-d38b-4879-907f-14cf554f00cd","html_url":"https://github.com/ortanaV2/DeepEntropic","commit_stats":null,"previous_names":["ortanav2/deepentropic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ortanaV2/DeepEntropic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortanaV2%2FDeepEntropic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortanaV2%2FDeepEntropic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortanaV2%2FDeepEntropic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortanaV2%2FDeepEntropic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ortanaV2","download_url":"https://codeload.github.com/ortanaV2/DeepEntropic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortanaV2%2FDeepEntropic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780617,"owners_count":24474686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":["deep-learning","deep-neural-networks","machine-learning","ml","model","neural-network","physics-simulation","python","pytorch","simulation"],"created_at":"2025-08-10T20:12:50.683Z","updated_at":"2025-08-10T20:12:56.059Z","avatar_url":"https://github.com/ortanaV2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"1920\" height=\"575\" alt=\"Deep_Entropic_Logo_Crop\" src=\"https://github.com/user-attachments/assets/97c727dc-d3e9-4d1d-9af9-99a51cd551ca\" /\u003e\n\n#### Registered Project for the Austrian Society for Artificial Intelligence (ASAI) Competition (BWKI): Accelerating Physical Simulations Using Neural Networks.\n\nThis project explores the use of neural networks to significantly improve the speed and performance of physical simulations, particularly in Python and related environments.\nAt its core, DeepEntropic is a hybrid simulation and machine learning framework for modeling and predicting the dynamics of interacting particles. It combines a high-performance C-based physics engine with structured data collection via SQLite and neural network training using PyTorch. The goal is to replace or accelerate traditional simulations by learning physical behaviors directly from data.\n\n## Features\n\n- **Particle Simulation:** Fast C/SDL2-based simulation of particle systems with gravity, pressure, viscosity, and boundary effects.\n- **Data Collection:** Automatic recording of simulation frames into an SQLite database for ML training.\n- **Parallel Simulation:** Supervisor script for running many simulations in parallel batches.\n- **Neural Network Training:** PyTorch code for training a model to predict particle movement from simulation data.\n- **Benchmarking \u0026 Visualization:** Python script for visualizing and benchmarking trained models.\n\n## Project Structure\n\n```\nDeepEntropic/\n├── simulation.c                # Particle simulation (C, SDL2, SQLite)\n├── simulation_supervisor.py    # Parallel batch runner for simulation\n├── model_training.py           # PyTorch training script\n├── model_benchmark.py          # Model evaluation \u0026 visualization\n├── dataset.db                  # SQLite database (generated)\n├── ptc_model_full.pt           # Trained model (generated)\n```\n\n## Requirements\n\n### Simulation (C)\n\n- SDL2\n- SQLite3\n- OpenMP (optional, for parallel force computation)\n- GCC/Clang (Linux/macOS) or MSVC (Windows)\n\n### Python\n\n- Python 3.10\n- PyTorch\n- numpy\n- matplotlib\n\n## Usage\n\n### 1. Build the Simulation\n\nOn Linux/macOS:\n```sh\ngcc -fopenmp simulation.c -o simulation `sdl2-config --cflags --libs` -lsqlite3 -O2 -lm\n```\n\nOn Windows (MinGW/MSYS2):\n```sh\ngcc -fopenmp simulation.c -o simulation `sdl2-config --cflags --libs` -lsqlite3 -O2 -lm\n```\n\n### 2. Run Simulations\n\nYou can run a single simulation:\n```sh\n./simulation.exe\n```\nOr use the supervisor to run many in parallel:\n```sh\npython simulation_supervisor.py\n```\nThis will generate or append to `dataset.db`.\n\n### 3. Train the Model\n\n```sh\npython model_training.py --db_path dataset.db --epochs 50 --batch_size 64\n```\nThis will produce `ptc_model_full.pt`.\n\n### 4. Benchmark \u0026 Visualize\n\n```sh\npython model_benchmark.py\n```\nThis will visualize the predicted particle trajectories using the trained model.\n\n## Data Format\n\n- **Inputs:** For each frame, each particle has 4 features: `prev_x`, `prev_y`, `cur_x`, `cur_y` (normalized to [0,1]).\n- **Targets:** For each frame, each particle has 2 features: `dx`, `dy` (change in normalized position).\n\n## Customization\n\n- Change simulation parameters in `simulation.c` (number of particles, physics constants, etc.).\n- Adjust neural network architecture in `model_training.py` and `model_benchmark.py`.\n\n## Troubleshooting\n\n- If you encounter multiprocessing/pickling errors in PyTorch DataLoader, set `num_workers=0`.\n- Make sure SDL2 and SQLite3 are installed and available to your compiler.\n- For large-scale simulation, ensure sufficient disk space for `dataset.db`.\n\n## License\n\n[MIT License](https://github.com/ortanaV2/DeepEntropic/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fortanav2%2Fdeepentropic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fortanav2%2Fdeepentropic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fortanav2%2Fdeepentropic/lists"}