Nature-inspired algorithms are a very popular tool for solving optimization problems.

Overview

NiaPy


Check codestyle and test build PyPI Version PyPI - Python Version PyPI - Status PyPI - Downloads GitHub Release Date Anaconda-Server Badge Documentation Status GitHub license

Scrutinizer Code Quality Coverage Status GitHub commit activity Updates Average time to resolve an issue Percentage of issues still open GitHub contributors

DOI DOI

Nature-inspired algorithms are a very popular tool for solving optimization problems. Numerous variants of nature-inspired algorithms have been developed (paper 1, paper 2) since the beginning of their era. To prove their versatility, those were tested in various domains on various applications, especially when they are hybridized, modified or adapted. However, implementation of nature-inspired algorithms is sometimes a difficult, complex and tedious task. In order to break this wall, NiaPy is intended for simple and quick use, without spending time for implementing algorithms from scratch.

Mission

Our mission is to build a collection of nature-inspired algorithms and create a simple interface for managing the optimization process. NiaPy offers:

  • numerous optimization problem implementations,
  • use of various nature-inspired algorithms without struggle and effort with a simple interface,
  • easy comparison between nature-inspired algorithms, and
  • export of results in various formats such as Pandas DataFrame, JSON or even Excel.

Installation

Install NiaPy with pip:

Latest version (2.0.0rc18)

$ pip install niapy==2.0.0rc18

To install NiaPy with conda, use:

$ conda install -c niaorg niapy=2.0.0rc18

Latest stable version

$ pip install niapy

To install NiaPy with conda, use:

$ conda install -c niaorg niapy

To install NiaPy on Fedora, use:

$ dnf install python3-niapy

Install from source

In case you want to install directly from the source code, use:

$ git clone https://github.com/NiaOrg/NiaPy.git
$ cd NiaPy
$ python setup.py install

Algorithms

Click here for the list of implemented algorithms.

Problems

Click here for the list of implemented test problems.

Usage

After installation, you can import NiaPy as any other Python module:

$ python
>>> import niapy
>>> niapy.__version__

Let's go through a basic and advanced example.

Basic Example

Let’s say, we want to try out Gray Wolf Optimizer algorithm against the Pintér problem function. Firstly, we have to create new file, with name, for example basic_example.py. Then we have to import chosen algorithm from NiaPy, so we can use it. Afterwards we initialize GreyWolfOptimizer class instance and run the algorithm. Given bellow is the complete source code of basic example.

from niapy.algorithms.basic import GreyWolfOptimizer
from niapy.task import Task

# we will run 10 repetitions of Grey Wolf Optimizer against the Pinter problem
for i in range(10):
    task = Task(problem='pinter', dimension=10, max_evals=1000)
    algorithm = GreyWolfOptimizer(population_size=20)
    best = algorithm.run(task)
    print(best[-1])

Given example can be run with python basic_example.py command and should give you similar output as following:

0.27046073106003377
50.89301186976975
1.089147452727528
1.18418058254198
102.46876441081712
0.11237241605812048
1.8869331711450696
0.04861881403346098
2.5748611081742325
135.6754069530421

Advanced Example

In this example we will show you how to implement a custom problem class and use it with any of implemented algorithms. First let's create new file named advanced_example.py. As in the previous examples we wil import algorithm we want to use from niapy module.

For our custom optimization function, we have to create new class. Let's name it MyProblem. In the initialization method of MyProblem class we have to set the dimension, lower and upper bounds of the problem. Afterwards we have to override the abstract method _evaluate which takes a parameter x, the solution to be evaluated, and returns the function value. Now we should have something similar as is shown in code snippet bellow.

import numpy as np
from niapy.task import Task
from niapy.problems import Problem
from niapy.algorithms.basic import GreyWolfOptimizer


# our custom problem class
class MyProblem(Problem):
    def __init__(self, dimension, lower=-10, upper=10, *args, **kwargs):
        super().__init__(dimension, lower, upper, *args, **kwargs)

    def _evaluate(self, x):
        return np.sum(x ** 2)

Now, all we have to do is to initialize our algorithm as in previous examples and pass an instance of our MyProblem class as the problem argument.

my_problem = MyProblem(dimension=20)
for i in range(10):
    task = Task(problem=my_problem, max_iters=100)
    algo = GreyWolfOptimizer(population_size=20)

    # running algorithm returns best found minimum
    best = algo.run(task)

    # printing best minimum
    print(best[-1])

Now we can run our advanced example with following command: python advanced_example.py. The results should be similar to those bellow.

7.606465129178389e-09
5.288697102580944e-08
6.875762169124336e-09
1.386574251424837e-08
2.174923591233085e-08
2.578545710051624e-09
1.1400628541972142e-08
2.99387377733644e-08
7.029492316948289e-09
7.426212520156997e-09

For more usage examples please look at examples folder.

More advanced examples can also be found in the NiaPy-examples repository.

Cite us

Are you using NiaPy in your project or research? Please cite us!

Plain format

      Vrbančič, G., Brezočnik, L., Mlakar, U., Fister, D., & Fister Jr., I. (2018).
      NiaPy: Python microframework for building nature-inspired algorithms.
      Journal of Open Source Software, 3(23), 613\. 
   

   

Bibtex format

    @article{NiaPyJOSS2018,
        author  = {Vrban{\v{c}}i{\v{c}}, Grega and Brezo{\v{c}}nik, Lucija
                  and Mlakar, Uro{\v{s}} and Fister, Du{\v{s}}an and {Fister Jr.}, Iztok},
        title   = {{NiaPy: Python microframework for building nature-inspired algorithms}},
        journal = {{Journal of Open Source Software}},
        year    = {2018},
        volume  = {3},
        issue   = {23},
        issn    = {2475-9066},
        doi     = {10.21105/joss.00613},
        url     = {https://doi.org/10.21105/joss.00613}
    }

RIS format

    TY  - JOUR
    T1  - NiaPy: Python microframework for building nature-inspired algorithms
    AU  - Vrbančič, Grega
    AU  - Brezočnik, Lucija
    AU  - Mlakar, Uroš
    AU  - Fister, Dušan
    AU  - Fister Jr., Iztok
    PY  - 2018
    JF  - Journal of Open Source Software
    VL  - 3
    IS  - 23
    DO  - 10.21105/joss.00613
    UR  - http://joss.theoj.org/papers/10.21105/joss.00613

Contributors

Thanks goes to these wonderful people (emoji key):


Grega Vrbančič

💻 📖 🐛 💡 🚧 📦 📆 👀

firefly-cpp

💻 📖 🐛 💡 👀 💬 ⚠️

Lucija Brezočnik

💻 📖 🐛 💡

mlaky88

💻 📖 💡

rhododendrom

💻 📖 💡 🐛 👀

Klemen

💻 📖 💡 🐛 👀

Jan Popič

💻 📖 💡

Luka Pečnik

💻 📖 💡 🐛

Jan Banko

💻 📖 💡

RokPot

💻 📖 💡

mihaelmika

💻 📖 💡

Jace Browning

💻

Musa Adamu Wakili

💬

Florian Schaefer

🤔

Jan-Hendrik Menke

💬

brett18618

💬

Timotej Zaťko

🐛

sisco0

💻

zStupan

💻 🐛 📖 💡 ⚠️

Tomáš Hrnčiar

💻

Ikko Ashimine

💻

andrazperson

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

Contributing

Open Source Helpers

We encourage you to contribute to NiaPy! Please check out the Contributing to NiaPy guide for guidelines about how to proceed.

Everyone interacting in NiaPy's codebases, issue trackers, chat rooms and mailing lists is expected to follow the NiaPy code of conduct.

Licence

This package is distributed under the MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.

Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!

Comments
  • Deprecation warnings

    Deprecation warnings

    Hi everyone!

    During the build of NiaPy rpm package, pytest reported several deprecation warnings.

    I am attaching a partial report created by pytest.

    =============================== warnings summary =============================== NiaPy/tests/test_aso.py::ASOElitismTestCase::test_custom_works_fine NiaPy/tests/test_aso.py::ASOElitismTestCase::test_griewank_works_fine NiaPy/tests/test_fa.py::FATestCase::test_griewank_works_fine NiaPy/tests/test_fa.py::FATestCase::test_works_fine NiaPy/tests/test_jade.py::CrossRandCurr2pbestTestCase::test_function_fine /usr/lib/python3.9/site-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray return array(a, dtype, copy=False, order=order) NiaPy/tests/test_es.py: 16660 warnings /builddir/build/BUILD/NiaPy-2.0.0rc13/NiaPy/algorithms/basic/es.py:329: DeprecationWarning: elementwise comparison failed; this will raise an error in the future. if e not in c: k += 1 NiaPy/tests/test_jade.py: 200 warnings /usr/lib/python3.9/site-packages/numpy/core/numeric.py:2378: DeprecationWarning: elementwise comparison failed; this will raise an error in the future. return bool(asarray(a1 == a2).all()) -- Docs: https://docs.pytest.org/en/stable/warnings.html

    opened by firefly-cpp 17
  • Is is possible to manually initialize the population?

    Is is possible to manually initialize the population?

    Is there a possibility to set an initial population manually or define a function which generates an individual from scratch?

    I guess it would be modifying NiaPy.algorithms.Individual.generateSolution, but should only replace it for the initial solution candidates. Has anyone tried this?

    My problem is binary but feasible candidates have a high 0 : 1 ratio, i suspect random initialization generates roughly the same amounts of 0 and 1 (rounded from float).

    question LGTM 
    opened by jhmenke 17
  • Loa algorithm

    Loa algorithm

    I added 2 files ('loa.py', 'run_loa.py'). An implementation of lion optimization algorithm and an example of how to run it. Algorithm steps and formulas are found in an article found on (https://doi.org/10.1016/j.jcde.2015.06.003).

    First I created a 'Lion' class that inherits from 'Individual'. Lions are distributed into groups called prides and a group called nomad lions.

    Steps of algorithm and progress so far:

    • Hunting: Completed.
    • Moving towards safe place: completed.
    • Roaming: For pride lions is completed, for nomad lions is completed.
    • Mating: Creating new pride offspring is completed, mutation on the pride offspring is completed. Creating new nomad offspring is completed, mutation on the nomad offspring is completed.
    • Defense: Attacking amongst males in prides is completed, nomad lions attacking the prides is completed
    • Migration: Completed
    • Population equilibrium: Completed

    Function that checks if lion's position has improved since last iteration ('data_correction') is also completed.

    Main function ('run_iteration') is also completed.

    feature 
    opened by AljoM 14
  • [JOSS] (Optional) Follow PEP-8 style guide in naming methods

    [JOSS] (Optional) Follow PEP-8 style guide in naming methods

    This is prescriptive and optional, but I personally find this very important. Please follow PEP8 as a prescriptive guide.

    • Methods usually have lower-case characters separated by underscores. TournamentSelection should be tournament_selection. Check this.
    • The package name should be in lower-case. NiaPy should be niapy. Check this.

    This is an issue related to openjournals/joss-reviews#613

    enhancement 
    opened by ljvmiranda921 12
  • Can not control the number of max_evals or max_iters

    Can not control the number of max_evals or max_iters

    Hi,

    Thank you very much for your hard working to create the NiaPy which is potential to improve much my research :-))))

    Could you please explain the differences between the parameter max_evals and max_iters in the task? And how can I control them? I tried to minimize the mean square error during the feature selection using Firefly Algorithm and CatBoost Regressor. However, when I set the max_evals = 10 as follows: task = Task(problem, max_evals=10, optimization_type=OptimizationType.MINIMIZATION, enable_logging=True) it only ran 5 evaluations:

    INFO:niapy.task.Task:evals:1 => 446.13928695170216
    INFO:niapy.task.Task:evals:5 => 433.54774275563943
    Number of selected features: 21
    

    or set the max_iters = 10 as follows: task = Task(problem, max_iters=10, optimization_type=OptimizationType.MINIMIZATION, enable_logging=True) it ran 2423 evaluations:

    INFO:niapy.task.Task:evals:1 => 446.13928695170216
    INFO:niapy.task.Task:evals:5 => 433.54774275563943
    INFO:niapy.task.Task:evals:11 => 428.94143771504224
    INFO:niapy.task.Task:evals:20 => 422.539381286218
    INFO:niapy.task.Task:evals:28 => 412.32678534520574
    INFO:niapy.task.Task:evals:30 => 412.07734133808253
    INFO:niapy.task.Task:evals:109 => 411.98004342657293
    INFO:niapy.task.Task:evals:139 => 400.99684114079884
    INFO:niapy.task.Task:evals:442 => 393.40534326526745
    INFO:niapy.task.Task:evals:1900 => 393.07398868489685
    INFO:niapy.task.Task:evals:2423 => 378.8922834335721
    Number of selected features: 22
    

    It seems a stopping criteria was set and the algorithm only stopped when it reached to this criteria. Is it correct? And should I use the parameter max_evals or max_iters in case of my problem?

    Many thanks, Thang

    opened by hanamthang 11
  • How to plot the convergence?

    How to plot the convergence?

    Thank you for your work first. Could you tell me is there a method to plot the convergence with x axis is iteration numbers and y is the fitness function values?

    question 
    opened by brett18618 11
  • Huge refactor

    Huge refactor

    Summary

    • Added python3.9 to integration tests
    • Renamed package to lowercase i. e. 'niapy'
    • Changed indentation to 4 spaces instead of tabs
    • Renamed variables and methods to snake case.
    • Fixed typos in docstrings.
    • Added missing docstrings and completed incomplete ones.
    • Temporarily removed (commented out) algorithms that weren't implemented or weren't working.
    • Renamed most of the algorithm parameters to names I think make sense.
    • Moved the initialization of algorithm parameters to the init method.
    • Removed type_parameters method from all algorithms and all the test cases for it.
    • Removed niapy.algorithms.statistics module as I don't think it's particularly useful.
    • Removed the utility classes in niapy.task.utility and niapy.algorithms.utility and replaced them with factory functions get_algorithm and get_benchmark in niapy.util.factory.
    • Made the task package into a module, since the package only contained one file (task.py) along with init.py.
    • Fixed issues #306, #294, #281, #264, #123

    Remaining problems:

    • I did not apply the code style changes and rules to tests.
    • I'm sure I missed some docstrings.
    • A lot of algorithms are missing reference papers,
    • All algorithms need to be checked if they're implemented correctly, I went through the reference papers for most of them and I think most are correct, I'm not sure about CRO, Krill Herd, and CrowdingDE.
    • There are some warnings when building the docs. Also things like the optimization tasks are missing in the docs. I don't know how to add them.
    • I'm sure a lot of performance could be gained by using numpy more efficiently, although performance isn't really the main goal of this project, so it's not a problem really.

    I'm sorry it took so long :sweat_smile:

    opened by zStupan 10
  • Fedora rpm build | two tests are failing

    Fedora rpm build | two tests are failing

    Two tests are failing:

    • test_Custom_works_fine
    • test_griewank_works_fine

    More info:

    https://src.fedoraproject.org/rpms/python-niapy/blob/master/f/python-niapy.spec#_86

    triage 
    opened by firefly-cpp 9
  • New mechanism for stopCond and old best values

    New mechanism for stopCond and old best values

    Hello,

    I'm struggling about two things recently. First is that I cannot order to stop optimization if the best solution achieves a minimum/maximum value. The stop condition only depends on the function evaluation or generation count.

    The other thing is that I want to see the error decreasing over iterations. Since we are not storing the best values in the algorithm, we cannot do this currently.

    Is there anything that I'm not aware of, achieves these? I would like to help if these might be added to the library, but with a guidance, since I'm not sure of how big the impact would be.

    Thanks as always.

    opened by kivancguckiran 9
  • OptimizationType.MAXIMIZATION does not work with GWO

    OptimizationType.MAXIMIZATION does not work with GWO

    Hi!

    OptimizationType.MAXIMIZATION does not work when used, I tried it with GWO but it seems to be buggy also with other algorithms.

    Steps to reproduce

    requirements.txt

    NiaPy==2.0.0rc5
    

    Code - taken from here, changed only the optimization type

    # encoding=utf8
    # This is temporary fix to import module from parent folder
    # It will be removed when package is published on PyPI
    import sys
    sys.path.append('../')
    # End of fix
    
    from NiaPy.algorithms.basic import GreyWolfOptimizer
    from NiaPy.task import StoppingTask, OptimizationType
    from NiaPy.benchmarks import Sphere
    
    # we will run Grey Wolf Optimizer for 5 independent runs
    for i in range(5):
        task = StoppingTask(D=10, nFES=10000, optType=OptimizationType.MAXIMIZATION, benchmark=Sphere())
        algo = GreyWolfOptimizer(NP=40)
        best = algo.run(task)
        print(best)
    
    

    Expected behavior

    It should not throw any error.

    Actual behavior

    TypeError                                 Traceback (most recent call last)
    <ipython-input-11-bed1e1b95f2d> in <module>
         14     task = StoppingTask(D=10, nFES=10000, optType=OptimizationType.MAXIMIZATION, benchmark=Sphere())
         15     algo = GreyWolfOptimizer(NP=40)
    ---> 16     best = algo.run(task)
         17     print(best)
    
    /opt/conda/lib/python3.7/site-packages/NiaPy/algorithms/algorithm.py in run(self, task)
        346         try:
        347             # task.start()
    --> 348             r = self.runTask(task)
        349             return r[0], r[1] * task.optType.value
        350         except (FesException, GenException, TimeException, RefException):
    
    /opt/conda/lib/python3.7/site-packages/NiaPy/algorithms/algorithm.py in runTask(self, task)
        326         algo, xb, fxb = self.runYield(task), None, inf
        327         while not task.stopCond():
    --> 328             xb, fxb = next(algo)
        329             task.nextIter()
        330         return xb, fxb
    
    /opt/conda/lib/python3.7/site-packages/NiaPy/algorithms/algorithm.py in runYield(self, task)
        306         yield xb, fxb
        307         while True:
    --> 308             pop, fpop, dparams = self.runIteration(task, pop, fpop, xb, fxb, **dparams)
        309             xb, fxb = self.getBest(pop, fpop, xb, fxb)
        310             yield xb, fxb
    
    /opt/conda/lib/python3.7/site-packages/NiaPy/algorithms/basic/gwo.py in runIteration(self, task, pop, fpop, xb, fxb, A, A_f, B, B_f, D, D_f, **dparams)
        109                 for i, w in enumerate(pop):
        110                         A1, C1 = 2 * a * self.rand(task.D) - a, 2 * self.rand(task.D)
    --> 111                         X1 = A - A1 * fabs(C1 * A - w)
        112                         A2, C2 = 2 * a * self.rand(task.D) - a, 2 * self.rand(task.D)
        113                         X2 = B - A2 * fabs(C2 * B - w)
    
    TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
    

    System configuration

    Using docker jupyter/scipy-notebook.

    bug 
    opened by timzatko 8
  • __init__() missing 3 required positional arguments: 'D', 'nFES', and 'benchmark'

    __init__() missing 3 required positional arguments: 'D', 'nFES', and 'benchmark'

    Hi,

    I tried your example of Flower Pollination Algorithm code, but i got an error like this :

         11 for i in range(5):
         12     task = StoppingTask(D=10, nFES=10000, benchmark=Sphere())
    ---> 13     algo = FlowerPollinationAlgorithm(NP=20, p=0.5)
         14     best = algo.run(task=algo)
         15     print(best)
    
    TypeError: __init__() missing 3 required positional arguments: 'D', 'nFES', and 'benchmark'
    

    Here's the code :

    # encoding=utf8
    # This is temporary fix to import module from parent folder
    # It will be removed when package is published on PyPI
    import sys
    sys.path.append('../')
    # End of fix
    
    import random
    from NiaPy.algorithms.basic import FlowerPollinationAlgorithm
    from NiaPy.task import StoppingTask
    from NiaPy.benchmarks import Sphere
    
    #we will run Flower Pollination Algorithm for 5 independent runs
    for i in range(5):
        task = StoppingTask(D=10, nFES=10000, benchmark=Sphere())
        algo = FlowerPollinationAlgorithm(NP=20, p=0.5)
        best = algo.run(task=algo)
        print(best)
    

    Hope you can help, thanks!

    question 
    opened by fakhrulfa 8
  • RUN Beyond the Metaphor An Efficient Optimization Algorithm Based on Runge Kutta Method

    RUN Beyond the Metaphor An Efficient Optimization Algorithm Based on Runge Kutta Method

    Hi I used several Optimization Algorithms. RUN Algorithm outperformed most of them. Please add it to NiaPy's Algorithms. Here is the link: https://github.com/aliasgharheidaricom/RUN-Beyond-the-Metaphor-An-Efficient-Optimization-Algorithm-Based-on-Runge-Kutta-Method

    opened by admodadmod 0
  • Squirrel Search Algorithm implementation try

    Squirrel Search Algorithm implementation try

    Summary

    Squirrel Search Algorithm implementation under ssa.py. The code does not have any bugs but the algorithms accuracy needs to be checked. Open Issue #338

    opened by altaregos 2
  • Squirrel search algorithm implementation

    Squirrel search algorithm implementation

    Squirrel search algorithm publication is currently the most cited article in SWEVO.

    It would be nice to have this algorithm in our collection.

    Has anyone time to implement this algorithm?

    enhancement help wanted 
    opened by firefly-cpp 3
  • Real (engineering) optimization problems

    Real (engineering) optimization problems

    NiaPy problems which consist of benchmark functions offer an excellent way of benchmarking nature-inspired algorithms quickly. However, many researchers now prefer to evaluate their algorithms also on real-world optimization (e.g. engineering) problems.

    Thus, I recommend a new feature which involves the implementations of some popular engineering problems as for example:

    • Welded beam design,
    • Pressure vessel design,
    • Speed reducer design, etc.

    Some of these are presented in detail in following paper (Appendix): http://www.informatica.si/index.php/informatica/article/viewFile/204/201

    Many of engineering problems are constrained in its nature. Is it possible to add some of the constraints-handling mechanisms in NiaPy?

    enhancement help wanted 
    opened by rhododendrom 3
  • GWO returns different type of results (individual) than other methods

    GWO returns different type of results (individual) than other methods

    GWO has individuals in the type of ndarray, while other algorithms have individuals of type of NiaPy.algorithms.algorithm.Individual.

    This is revealed when the runIteration returns the results: pop of GWO is the array of ndarrays and others return array of Individual.

    opened by karakatic 13
Releases(2.0.4)
Owner
NiaOrg
NiaOrg
A command line tool for memorizing algorithms in Python by typing them.

Algo Drills A command line tool for memorizing algorithms in Python by typing them. In alpha and things will change. How it works Type out an algorith

Travis Jungroth 43 Dec 02, 2022
A Python project for optimizing the 8 Queens Puzzle using the Genetic Algorithm implemented in PyGAD.

8QueensGenetic A Python project for optimizing the 8 Queens Puzzle using the Genetic Algorithm implemented in PyGAD. The project uses the Kivy cross-p

Ahmed Gad 16 Nov 13, 2022
Evol is clear dsl for composable evolutionary algorithms that optimised for joy.

Evol is clear dsl for composable evolutionary algorithms that optimised for joy. Installation We currently support python3.6 and python3.7 and you can

GoDataDriven 178 Dec 27, 2022
Algorithm for Cutting Stock Problem using Google OR-Tools. Link to the tool:

Cutting Stock Problem Cutting Stock Problem (CSP) deals with planning the cutting of items (rods / sheets) from given stock items (which are usually o

Emad Ehsan 87 Dec 31, 2022
Algorithm and Structured Programming course project for the first semester of the Internet Systems course at IFPB

Algorithm and Structured Programming course project for the first semester of the Internet Systems course at IFPB

Gabriel Macaúbas 3 May 21, 2022
A minimal implementation of the IQRM interference flagging algorithm for radio pulsar and transient searches

A minimal implementation of the IQRM interference flagging algorithm for radio pulsar and transient searches. This module only provides the algorithm that infers a channel mask from some spectral sta

Vincent Morello 6 Nov 29, 2022
Algorithms-in-Python - Programs related to DSA in Python for placement practice

Algorithms-in-Python Programs related to DSA in Python for placement practice CO

MAINAK CHAUDHURI 2 Feb 02, 2022
Genetic algorithm which evolves aoe2 DE ai scripts

AlphaScripter Use the power of genetic algorithms to evolve AI scripts for Age of Empires II : Definitive Edition. For now this package runs in AOC Us

6 Nov 04, 2022
Classic algorithms including Fizz Buzz, Bubble Sort, the Fibonacci Sequence, a Sudoku solver, and more.

Algorithms Classic algorithms including Fizz Buzz, Bubble Sort, the Fibonacci Sequence, a Sudoku solver, and more. Algorithm Complexity Time and Space

1 Jan 14, 2022
Our implementation of Gillespie's Stochastic Simulation Algorithm (SSA)

SSA Our implementation of Gillespie's Stochastic Simulation Algorithm (SSA) Requirements python =3.7 numpy pandas matplotlib pyyaml Command line usag

Anoop Lab 1 Jan 27, 2022
Solving a card game with three search algorithms: BFS, IDS, and A*

Search Algorithms Overview In this project, we want to solve a card game with three search algorithms. In this card game, we have to sort our cards by

Korosh 5 Aug 04, 2022
A selection of a few algorithms used to sort or search an array

Sort and search algorithms This repository has some common search / sort algorithms written in python, I also included the pseudocode of each algorith

0 Apr 02, 2022
FPE - Format Preserving Encryption with FF3 in Python

ff3 - Format Preserving Encryption in Python An implementation of the NIST approved FF3 and FF3-1 Format Preserving Encryption (FPE) algorithms in Pyt

Privacy Logistics 42 Dec 16, 2022
A python implementation of the Basic Photometric Stereo Algorithm

Photometric-Stereo A python implementation of the Basic Photometric Stereo Algorithm Result Usage run Photometric_Stereo.py Code Tree |data #原始数据,tga格

20 Dec 19, 2022
A lightweight, object-oriented finite state machine implementation in Python with many extensions

transitions A lightweight, object-oriented state machine implementation in Python with many extensions. Compatible with Python 2.7+ and 3.0+. Installa

4.7k Jan 01, 2023
Implementation of an ordered dithering algorithm used in computer graphics

Ordered Dithering Project In this project, we use an ordered dithering method to turn an RGB image, first to a gray scale image and then, turn the gra

1 Oct 26, 2021
Primedice like provably fair algorithm

Primedice like provably fair algorithm

Ryu juheon 3 Dec 02, 2022
Implemented page rank program

Page Rank Implemented page rank program based on fact that a website is more important if it is linked to by other important websites using recursive

Vaibhaw 6 Aug 24, 2022
🧬 Training the car to do self-parking using a genetic algorithm

🧬 Training the car to do self-parking using a genetic algorithm

Oleksii Trekhleb 652 Jan 03, 2023
A Python Package for Portfolio Optimization using the Critical Line Algorithm

A Python Package for Portfolio Optimization using the Critical Line Algorithm

19 Oct 11, 2022