Skip to content

javidahmed64592/genetic-algorithm

Repository files navigation

python uv Ruff License: MIT

Genetic Algorithm

A Python implementation of genetic algorithms.

Install this package using pip:

pip install -e git+https://github.com/javidahmed64592/genetic-algorithm#egg=genetic_algorithm

To update the package:

pip update -e git+https://github.com/javidahmed64592/genetic-algorithm#egg=genetic_algorithm

Note: It is recommended to install this into a virtual environment.

Table of Contents

uv

This repository is managed using the uv Python project manager: https://docs.astral.sh/uv/

To install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh                                    # Linux/Mac
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows

Installing Dependencies

Install the required dependencies using pip:

uv sync

To install with dev dependencies:

uv sync --extra dev

Using the Genetic Algorithm

For an example of how to use the genetic algorithm, see examples/phrase_solver.ipynb where it is used to generate a specific sentence from random characters.

Testing, Linting, and Type Checking

  • Run tests: uv run pytest
  • Lint code: uv run ruff check .
  • Format code: uv run ruff format .
  • Type check: uv run mypy .

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Python implementation of genetic algorithms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages