Pygalib
A simple and easy-to-use genetic algirthm library
Install / Use
/learn @lfzark/PygalibREADME
Python Genetic Algorithm Library (pygalib)
A simple and easy-to-use genetic algorithm library
Installation
Use pip:
pip install pygalib
if you want to install from source code , you can download from pypi or simple use:
git clone https://github.com/lfzark/pygalib
then run:
python setup.py install
Example
import pygalib
if __name__ == "__main__":
indiv = pygalib.Individual(
gene_set=range(1,10),
chrom_len = 4,
fitness_func=lambda x:(x[0]+x[1])/x[2]-x[3]
)
ga = pygalib.GA(
p_size = 100,
individual=indiv,
n_generation = 1000
)
print ga.run().chromosome
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
