diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..ff29021 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,11 @@ +# file GENERATED by distutils, do NOT edit +setup.cfg +setup.py +Solid/EvolutionaryAlgorithm.py +Solid/GeneticAlgorithm.py +Solid/HarmonySearch.py +Solid/ParticleSwarm.py +Solid/SimulatedAnnealing.py +Solid/StochasticHillClimb.py +Solid/TabuSearch.py +Solid/__init__.py diff --git a/README.md b/README.md index 496cf9c..c1d6743 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,12 @@ -# Metaheuristics-library-placeholder +# Solid + +## *Solid* is a simple library for gradient-free optimization. + +#### It contains basic versions of many of the most common algorithms, and allows for very rapid development using them. + +#### It's a very versatile library that's great for learning, modifying, and of course, using out-of-the-box. + +
## Current Features: * Genetic Algorithm @@ -12,10 +20,10 @@
## Usage: -* ```pip install``` +* ```pip install solidpy``` * Import the relevant algorithm * Create a class that inherits from that algorithm, and that implements the necessary abstract methods -* Call its ```.run()``` method +* Call its ```.run()``` method, which always returns the best solution and its objective function value
@@ -24,7 +32,7 @@ ```python from random import choice, randint, random from string import lowercase -from library.EvolutionaryAlgorithm import EvolutionaryAlgorithm +from Solid import EvolutionaryAlgorithm class Algorithm(EvolutionaryAlgorithm): diff --git a/library/EvolutionaryAlgorithm.py b/Solid/EvolutionaryAlgorithm.py similarity index 100% rename from library/EvolutionaryAlgorithm.py rename to Solid/EvolutionaryAlgorithm.py diff --git a/library/GeneticAlgorithm.py b/Solid/GeneticAlgorithm.py similarity index 100% rename from library/GeneticAlgorithm.py rename to Solid/GeneticAlgorithm.py diff --git a/library/HarmonySearch.py b/Solid/HarmonySearch.py similarity index 100% rename from library/HarmonySearch.py rename to Solid/HarmonySearch.py diff --git a/library/ParticleSwarm.py b/Solid/ParticleSwarm.py similarity index 100% rename from library/ParticleSwarm.py rename to Solid/ParticleSwarm.py diff --git a/library/SimulatedAnnealing.py b/Solid/SimulatedAnnealing.py similarity index 100% rename from library/SimulatedAnnealing.py rename to Solid/SimulatedAnnealing.py diff --git a/library/StochasticHillClimb.py b/Solid/StochasticHillClimb.py similarity index 100% rename from library/StochasticHillClimb.py rename to Solid/StochasticHillClimb.py diff --git a/library/TabuSearch.py b/Solid/TabuSearch.py similarity index 100% rename from library/TabuSearch.py rename to Solid/TabuSearch.py diff --git a/library/__init__.py b/Solid/__init__.py similarity index 100% rename from library/__init__.py rename to Solid/__init__.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..224a779 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5dd4b43 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +from distutils.core import setup +setup( + name = 'solidpy', + packages = ['Solid'], + version = '0.1', + description = 'A comprehensive gradient-free optimization library', + author = 'Devin Soni', + author_email = 'devinsoni1010@gmail.com', + url = 'https://github.com/100/Solid', + download_url = 'https://github.com/100/Solid/archive/0.1.tar.gz', + keywords = ['metaheuristic', 'optimization', 'algorithm', 'artificial intelligence', 'machine learning'], + classifiers = ['Programming Language :: Python :: 2.7'], +) \ No newline at end of file diff --git a/tests/test_evolutionary_algorithm.py b/tests/test_evolutionary_algorithm.py index 65ed334..7645856 100644 --- a/tests/test_evolutionary_algorithm.py +++ b/tests/test_evolutionary_algorithm.py @@ -1,6 +1,6 @@ from random import choice, randint, random from string import lowercase -from library.EvolutionaryAlgorithm import EvolutionaryAlgorithm +from Solid.EvolutionaryAlgorithm import EvolutionaryAlgorithm class Algorithm(EvolutionaryAlgorithm): diff --git a/tests/test_genetic_algorithm.py b/tests/test_genetic_algorithm.py index ec8794e..79dc5e0 100644 --- a/tests/test_genetic_algorithm.py +++ b/tests/test_genetic_algorithm.py @@ -1,5 +1,5 @@ from random import choice -from library.GeneticAlgorithm import GeneticAlgorithm +from Solid.GeneticAlgorithm import GeneticAlgorithm class Algorithm(GeneticAlgorithm): diff --git a/tests/test_harmony_search.py b/tests/test_harmony_search.py index 0190f7b..7181bff 100644 --- a/tests/test_harmony_search.py +++ b/tests/test_harmony_search.py @@ -1,5 +1,5 @@ from random import uniform -from library.HarmonySearch import HarmonySearch +from Solid.HarmonySearch import HarmonySearch class Algorithm(HarmonySearch): diff --git a/tests/test_particle_swarm.py b/tests/test_particle_swarm.py index 1aa277e..d4741b4 100644 --- a/tests/test_particle_swarm.py +++ b/tests/test_particle_swarm.py @@ -1,4 +1,4 @@ -from library.ParticleSwarm import ParticleSwarm +from Solid.ParticleSwarm import ParticleSwarm class Algorithm(ParticleSwarm): diff --git a/tests/test_simulated_annealing.py b/tests/test_simulated_annealing.py index 4d6b9c7..c4fc93f 100644 --- a/tests/test_simulated_annealing.py +++ b/tests/test_simulated_annealing.py @@ -1,5 +1,5 @@ from random import uniform -from library.SimulatedAnnealing import SimulatedAnnealing +from Solid.SimulatedAnnealing import SimulatedAnnealing from numpy import array diff --git a/tests/test_stochastic_hill_climb.py b/tests/test_stochastic_hill_climb.py index a603e26..006b313 100644 --- a/tests/test_stochastic_hill_climb.py +++ b/tests/test_stochastic_hill_climb.py @@ -1,5 +1,5 @@ from random import uniform -from library.StochasticHillClimb import StochasticHillClimb +from Solid.StochasticHillClimb import StochasticHillClimb from numpy import array diff --git a/tests/test_tabu_search.py b/tests/test_tabu_search.py index df8d087..7289106 100644 --- a/tests/test_tabu_search.py +++ b/tests/test_tabu_search.py @@ -1,6 +1,6 @@ from random import choice, randint, random from string import lowercase -from library.TabuSearch import TabuSearch +from Solid.TabuSearch import TabuSearch from copy import deepcopy