{"id":19485769,"url":"https://github.com/ec-kity/dnc","last_synced_at":"2026-02-27T12:19:22.614Z","repository":{"id":251739221,"uuid":"784736538","full_name":"EC-KitY/DNC","owner":"EC-KitY","description":"A Deep Neural Crossover Plugin for ECKity","archived":false,"fork":false,"pushed_at":"2025-04-21T13:30:09.000Z","size":316,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T16:40:23.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EC-KitY.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-10T13:04:45.000Z","updated_at":"2025-04-21T13:30:12.000Z","dependencies_parsed_at":"2025-05-10T16:00:45.010Z","dependency_job_id":null,"html_url":"https://github.com/EC-KitY/DNC","commit_stats":null,"previous_names":["ec-kity/dnc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EC-KitY/DNC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FDNC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FDNC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FDNC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FDNC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EC-KitY","download_url":"https://codeload.github.com/EC-KitY/DNC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FDNC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29894478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-10T20:30:00.972Z","updated_at":"2026-02-27T12:19:22.560Z","avatar_url":"https://github.com/EC-KitY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deep Neural Crossover (DNC)\n\nThis repository implements the **Deep Neural Crossover (DNC)** operator as described in the paper:  \n**\"Deep Neural Crossover: A Multi-Parent Operator That Leverages Gene Correlations\"**  \n[ACM Link](https://dl.acm.org/doi/abs/10.1145/3638529.3654020)\n![alt text](images/fitness_graph.png \"Title\")\n\n---\n\n\n## 🚀 Quick Start\n\nTo run a full example using the DNC operator on the **Bin Packing Problem**, execute:\n\n```bash\npython dnc_runner_eckity.py\n```\n\nThis example uses:\n- Integer vector representation of solutions.\n- A domain-specific fitness evaluator for bin packing.\n- Tournament selection, and n-point mutation.\n\n---\n\n## 📁 File Structure\n\n- `dnc_runner_eckity.py` - Main script running the evolutionary algorithm with the DNC operator.\n- `datasets/hard_parsed.json` - A JSON file containing bin packing datasets used in the paper.\n- Custom components:\n  - `BinPackingEvaluator` - Evaluates fitness based on bin packing constraints.\n---\n\n## Customization Guide\n\nTo use this code for a different problem domain, **only a few parts need to be modified**:\n\n### 1. Define a Custom Evaluator\n\nReplace `BinPackingEvaluator` with a custom class that inherits from `SimpleIndividualEvaluator`:\n\n```python\nclass YourEvaluator(SimpleIndividualEvaluator):\n    def evaluate_individual(self, individual):\n        # return a float indicating fitness\n        return your_fitness_function(individual.vector)\n```\n\n### 2. Update the Creator (if needed)\n\nIf you need special initialization, adjust `GAIntegerStringVectorCreator`.\n\n### 3. Configure DNC\n\nThe DNC operator requires setting the correct number of embedding dimensions, which should correspond to the **number of distinct values each gene can take** (i.e., the number of bins, colors, etc.).\n\n```python\nDeepNeuralCrossoverConfig(\n    gene_value_dim=MAX_GENE_VALUE + 1,\n    embedding_dim=EMBED_DIM,  # e.g., 64\n    ...\n)\n```\n\n---\n\n## ⚙️ Evolutionary Parameters\n\nYou can easily adjust standard evolutionary settings:\n\n```python\npopulation_size = 100\ncrossover_rate = 0.5\nmutation_rate = 0.1\nnum_generations = 6000\n```\n\nThese are passed to the `Subpopulation` and `SimpleEvolution` constructors.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fec-kity%2Fdnc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fec-kity%2Fdnc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fec-kity%2Fdnc/lists"}