{"id":18773733,"url":"https://github.com/ismaelvr1999/bioinspiredalgorithms","last_synced_at":"2026-05-01T16:34:33.179Z","repository":{"id":191086185,"uuid":"683891841","full_name":"ismaelvr1999/BioinspiredAlgorithms","owner":"ismaelvr1999","description":"This repository contains implementations of various bioinspired algorithms for optimization and machine learning. ","archived":false,"fork":false,"pushed_at":"2024-08-20T23:34:59.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T02:46:12.730Z","etag":null,"topics":["machine-learning","matplotlib","numpy","python","tensorflow"],"latest_commit_sha":null,"homepage":"","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/ismaelvr1999.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}},"created_at":"2023-08-28T02:13:10.000Z","updated_at":"2024-08-20T23:35:02.000Z","dependencies_parsed_at":"2023-08-28T04:01:17.868Z","dependency_job_id":"48da24f4-5955-471a-bbdb-15bff37803ba","html_url":"https://github.com/ismaelvr1999/BioinspiredAlgorithms","commit_stats":null,"previous_names":["ismaelvr1999/algoritmos_bioinspirados","ismaelvr1999/bioinspiredalgorithms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ismaelvr1999/BioinspiredAlgorithms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelvr1999%2FBioinspiredAlgorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelvr1999%2FBioinspiredAlgorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelvr1999%2FBioinspiredAlgorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelvr1999%2FBioinspiredAlgorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismaelvr1999","download_url":"https://codeload.github.com/ismaelvr1999/BioinspiredAlgorithms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelvr1999%2FBioinspiredAlgorithms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32505106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["machine-learning","matplotlib","numpy","python","tensorflow"],"created_at":"2024-11-07T19:35:17.614Z","updated_at":"2026-05-01T16:34:33.162Z","avatar_url":"https://github.com/ismaelvr1999.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bioinspired Algorithms Repository\n\nThis repository contains implementations of various bioinspired algorithms for optimization and machine learning. The included algorithms are:\n\n- Genetic Algorithm\n- Ant Colony Algorithm\n- Simulated Annealing\n- Immune System Algorithm\n- Neural Network\n\n# Table of Contents 📚\n- [Technologies Used 🔧](#Technologies-Used-)\n- [Usage 🚀](#Usage-)\n- [Tests and Examples 🔬](#Tests-and-Examples)\n    - [Genetic Algorithm Test](#Genetic-Algorithm-Test)\n    - [Ant Colony Algorithm Test](#Ant-Colony-Algorithm-Test)\n    - [Simulated Annealing Test](#Simulated-Annealing-Test)\n    - [Neural Network Algorithm Test](#Neural-Network-Algorithm-Test)\n- [Author ✍️](#Author)\n\n\n# Technologies Used 🔧\n- **Python** 🐍: Programming language used for data analysis and machine learning.\n- **NumPy** 📊: For handling numerical data and arrays.\n- **TensorFlow** 🤖: For building and training the neural network model.\n- **Matplotlib** 📈: For visualizing the results (note: this is implied; if you used it, you should mention how it's used).\n## Usage 🚀\n\nTo run the project , follow these steps:\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/ismaelvr1999/BioinspiredAlgorithms.git\n2. **Install Dependencies:**:\n    ```bash\n    pip install -r requirements.txt\n\n# Tests and Examples\n\nBelow are examples of how to use each algorithm included in this repository.\n\n## Genetic Algorithm Test\n\n\n```python\n# Parameter configuration\nAlgGen = AlgBio.AlgGen()\nmutation_rate = datos[\"AlgGen\"][\"MutationRate\"]\niterations = datos[\"AlgGen\"][\"Iterations\"]\n\n# Initialize and generate generations\nobj = ParamLib.ParamAlgGenetico(AlgGen, iterations, mutation_rate)\nobj.GenerateGenerations()\n```\n## Ant Colony Algorithm Test\n\n```python\n# Graph configuration\ngraph = [\n    [0, 5, 2, 10],\n    [5, 0, 6, 3],\n    [2, 6, 0, 8],\n    [10, 3, 8, 0]\n]\n\n# Algorithm parameters\nnum_ants = datos[\"AlgAntColony\"][\"NumAnts\"]\niterations = datos[\"AlgAntColony\"][\"Iterations\"]\nevaporation_rate = datos[\"AlgAntColony\"][\"EvaporationRate\"]\nalpha = datos[\"AlgAntColony\"][\"Alpha\"]\nbeta = datos[\"AlgAntColony\"][\"Beta\"]\n\n# Initialization and execution\nobjective_function = ParamLib.ParamAlgAntColony(graph)\ncolony = AlgBio.AntColony(num_ants=num_ants, num_iterations=iterations, evaporation_rate=evaporation_rate, alpha=alpha, beta=beta, graph=graph, objective_function=objective_function)\nbest_tour, best_distance = colony.run()\nprint(f\"Best distance found: {best_distance}\")\nprint(f\"Best path found: {best_tour}\")\n```\n## Simulated Annealing Test\n\n```python\n# Cities configuration\ncities = [(0, 0), (1, 2), (3, 1), (2, 3), (5, 2)]  # Coordinates of the cities\n\n# Algorithm parameters\ninitial_temperature = datos[\"AlgSimulatedAnnealing\"][\"InitialTemp\"]\ncooling_factor = datos[\"AlgSimulatedAnnealing\"][\"CoolingFactor\"]\niterations = datos[\"AlgSimulatedAnnealing\"][\"Iterations\"]\n\n# Initialization and execution\nobjective_function = ParamLib.ParamAlgSimulatedAnnealing(cities)\nannealing = AlgBio.SimulatedAnnealing(cities, initial_temperature, cooling_factor, iterations, objective_function)\nbest_solution, best_cost = annealing.simulated_annealing()\nprint(\"Best solution found:\", best_solution)\nprint(\"Cost of the best solution:\", best_cost)\n```\n## Neural Network Algorithm Test\n\n```python\nimport numpy as np\nimport AlgBio\nimport ParamLib\n\n# Training data\ncelsius = np.array([0, 5, 10, 15, 20, 25, 30, 35, 40, 45,\n                    50, 55, 60, 65, 70, 75, 80, 85, 90, 95,\n                    100, 105, 110, 115, 120, 125, 130, 135, 140, 145,\n                    150, 155, 160, 165, 170, 175, 180, 185, 190, 195], dtype=float)\n\nfahrenheit = np.array([32, 41, 50, 59, 68, 77, 86, 95, 104, 113,\n                       122, 131, 140, 149, 158, 167, 176, 185, 194, 203,\n                       212, 221, 230, 239, 248, 257, 266, 275, 284, 293,\n                       302, 311, 320, 329, 338, 347, 356, 365, 374, 383], dtype=float)\n\n# Neural network parameters\nnum_neurons = datos[\"NeuralNetwork\"][\"num_neurons\"]\nlearning_rate = datos[\"NeuralNetwork\"][\"learning_rate\"]\nnum_epochs = datos[\"NeuralNetwork\"][\"num_epochs\"]\nnum_layers = datos[\"NeuralNetwork\"][\"num_hidden_layers\"]\n\n# Initialization and training\nnn_config = AlgBio.NeuralNetwork(num_neurons, learning_rate, num_layers)\nmodel = nn_config.getModel()\nneural_network = ParamLib.ParamNeuralNetwork(model, celsius, fahrenheit, num_epochs)\nneural_network.train()\nprint(neural_network.predict(0))\n```\n\n# Author\n- [@ismaelvr1999](https://www.github.com/ismaelvr1999)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismaelvr1999%2Fbioinspiredalgorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismaelvr1999%2Fbioinspiredalgorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismaelvr1999%2Fbioinspiredalgorithms/lists"}