Skip to main content

KrasheMit

KrasheMit — это Python-библиотека для решения различных оптимизационных задач с использованием алгоритма взаимодействующих стран.

Введение

KrasheMit реализует эволюционный алгоритм, в котором «страны» взаимодействуют между собой (обмен, война, эпидемии, эпидемия и т.д.), чтобы находить оптимальные решения сложных задач. Такой подход позволяет гибко управлять поиском экстремумов и использовать разнообразные стратегии обновления решений.

Возможности

  • Решение многомерных оптимизационных задач
  • Имитация сотрудничества и конкуренции между странами (алгоритмические подходы: войны, обмены)
  • Легкая настройка параметров алгоритма
  • Встроенные классы для индивидуумов и стран, а также вспомогательные методы мутаций и скрещивания

Установка

pip install krashemit

Пример использования

import numpy as np
from krashemit.algorithms.country_optimization import CountriesAlgorithm

def func(x):
    return sum(np.array(x)**2)

Xmin = [-10, -10]
Xmax = [10, 10]
algorithm = CountriesAlgorithm(
    f=func,
    Xmin=Xmin,
    Xmax=Xmax,
    M=3,
    N=10,
    n=5,
    p=[0.1, 0.5],
    m=3,
    k=2,
    l=3,
    ep=[0.2, 0.1],
    tmax=100,
    printing=True
)
result = algorithm.start()
print("Лучшее решение:", result)

Metadata

Release files for krashemit 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for krashemit 1.0.9
File Size Uploaded Provenance Actions
krashemit-1.0.9.tar.gz 18.4 kB Without provenance Details for krashemit-1.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for krashemit 1.0.9
File Interpreter ABI Platform Actions
krashemit-1.0.9-py3-none-any.whl Python 3 none any Details for krashemit-1.0.9-py3-none-any.whl

Total release size: 45.0 kB

Release files / krashemit-1.0.9.tar.gz

Download URL krashemit-1.0.9.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d25958f4ab92b25ed3fb3168dac3ecec7fb8e9a7c803bba3d9d43827b399606e
BLAKE2b-256 checksum
How to use checksums
097eb83cd6fecc2822c2307514fd452d9274506b0ce3087c711f5ddf2188a6a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.2

Release files / krashemit-1.0.9-py3-none-any.whl

Download URL krashemit-1.0.9-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b251042a060a35421230f5da0cb33b452895b765f549a420bf26f3f677a4808
BLAKE2b-256 checksum
How to use checksums
d832e1fac387a8938b7f723e967eddebffa5ea63e0c03045acd7bc6b4077f5f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.2

Security for krashemit 1.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page