Skip to main content

Library with a collection of useful classes and methods to DRY

Project description

A Python library for implementing genetic algorithms and evolutionary computation methods.

Overview

Mango Genetic provides a comprehensive framework for building and running genetic algorithms. It includes implementations of various genetic operators such as selection, crossover, mutation, and replacement strategies.

Features

Individual Management - Base classes for representing individuals with different encoding types (real, binary, integer, categorical)

Population Control - Population management with configurable size and generation limits

Selection Methods - Multiple selection strategies including roulette wheel, tournament, rank-based, and elitism

Crossover Operators - Various crossover methods like blend, one-split, two-split, linear, flat, gaussian, and mask

Mutation Control - Configurable mutation rates with static, adaptive, gene-based, and population-based approaches

Replacement Strategies - Different replacement methods including elitist, stochastic elitist, random, and offspring-only

Configuration System - Flexible configuration management for all genetic algorithm parameters

Installation

Using uv:

uv add mango-genetic

Using pip:

pip install mango-genetic

Dependencies

  • Python >= 3.10

  • numpy >= 1.24.4

  • mango[data] == 0.3.0a8

Quick Start

from mango_genetic.config import GeneticBaseConfig
from mango_genetic.individual import Individual
from mango_genetic.population import Population

# Load configuration
config = GeneticBaseConfig("config.cfg")

# Create population and run genetic algorithm
population = Population(config, fitness_function)
population.run()

Documentation

For detailed documentation, visit the Mango Documentation.

License

This project is licensed under the Apache Software License.

Support

For questions, issues, or contributions, please contact:

Made with ❤️ by baobab soluciones

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mango_genetic-1.0.1a1.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mango_genetic-1.0.1a1-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file mango_genetic-1.0.1a1.tar.gz.

File metadata

  • Download URL: mango_genetic-1.0.1a1.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for mango_genetic-1.0.1a1.tar.gz
Algorithm Hash digest
SHA256 e8b3d829335eefb9611d6b85be3565a84cc37a292045221bd5309f7812f2bfa7
MD5 6b97164714dcd0738eee71ea339e309c
BLAKE2b-256 58186bc548b98ef6a7ceff744f626a8e44315e221eb375737020cebabe63a707

See more details on using hashes here.

File details

Details for the file mango_genetic-1.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for mango_genetic-1.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 1301669ae1d22acbe5b7b70caaf28b232fd594f38b713db37db4b40028ac6705
MD5 4791396eb03e0f747797ae9623e95c97
BLAKE2b-256 80ab1784f649b5e6eea82d30d009a0547bcfdac63bb90e00f4ffd1036cbc4885

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page