Mealpy

Latest version: v3.0.1

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 9

2.5.0

Update

+ Add save and load model functionalities in mealpy.utils.io module.
+ Add object that hold global/current worst solution in history object
+ Add method generate_group_population() in Optimizer class
+ Add method before_initialization() in Optimizer class
+ Refactor initialization() and after_initialization() in Optimizer class
+ Remove before_evolve(), after_evolve(), and levy_flight() in Optimizer class
+ Convert termination_start() and termination_end() to check_termination() in Optimizer class
+ Remove boundary.py in utils
+ Add set_parameters() and get_parameters() in all optimizers
+ **Update new Problem class, move problem parameter from Optimizer to solve() function.**
+ Fix bug printing same entry multiple times in logger.
+ Fix bug exit() in Optimizer and utils package.
+ **Update new Termination class, move termination parameter from Optimizer to solve() function.**
+ **Add Multitask class that can run multiple optimizers on multiple problems with multiple trials.**
+ Refactor all optimizers.
+ **Add Tuner class that can help tuning hyper-parameters of optimizer.**
+ Add examples how to build new optimizer.
+ Add examples for Multitask and Tuner class.
+ Update documents, examples, tests


---------------------------------------------------------------------

2.4.2

Update

+ Add n_workers variable to solve() function in Optimizer class
+ n_workers only effect by parallel mode such as "process" and "thread"
+ n_workers default value is None and based on concurrent.futures module
+ Add 1 more Optional input parameter to the fitness function
+ Fix bug trajectory chart
+ Update fitness and objective chart
+ Remove supporting Python < 3.7, Mealpy only supports Python >=3.7
+ Group probabilistic is merged into math-based group
+ Update documents, examples, tests


---------------------------------------------------------------------

2.4.1

Update

+ Add after_initialization(), termination_end() to Optimizer class
+ Update create_solution(), initialization() in Optimizer class
+ Add "starting_positions" parameter to solve() function in Optimizer class
+ Fix missing amend_position function in GA
+ Fix bug fitness value in history object
+ Update 4 training modes in all algorithms
code
Type: Parallel (no effect on updating process of agents) has 2 training modes:

1. Process: Using multi-cores to update fitness for whole population
2. Thread: Using multi-threads to update fitness for whole population

Type: Sequential has 2 training modes

3. Swarm (no effect on updating process): Updating fitness after the whole population move
4. Single (effect on updating process): Updating fitness after each agent move

+ Add agent's history and starting positions to docs.


---------------------------------------------------------------------

2.4.0

Update

+ Add mealpy's support functions in terminal: help(mealpy), dir(mealpy)
+ Add logger module (Logger class)
+ Add validator module (Validator class)
+ Change in Optimizer class:
+ remove function get_global_best_global_worst_solution()
+ replace save_optimization_process() by track_optimize_step() and track_optimize_process()
+ update input of Problem and Termination object in Optimizer.
+ add logger
+ add validator and update all algorithms
+ update function: get_special_solutions()
+ rename function: crossover_arthmetic_recombination() to crossover_arithmetic()
+ rename function: get_fitness_position() to get_target_wrapper()
+ rename function: update_fitness_population() to update_target_wrapper_population()

+ A default method: generate_position() in Problem class.
+ Due to nature's characteristics of different problems, 2 methods can be designed for Optimizer to fit the problem
are generate_position() and amend_position(). Both methods are moved from Optimizer
class to Problem class, the create_solution() in Optimizer class will call these methods to create a new solution.
+ Update History and Problem class
+ design default amend_position function in Problem class
+ parameter: obj_weight changed to obj_weights
+ add parameter: save_population to control
+ Add Pareto-like Sequential Sampling (PSS) to math_based group


---------------------------------------------------------------------

2.3.0

Update

+ All algorithms have been updated with the amend_position function for solving the discrete problem.
+ Required packages are version reduction to fit python 3.6
+ Add examples of how to design and custom a new algorithm based on this framework
+ Add examples mealpy solve discrete problems (combinatorial, permutation)


---------------------------------------------------------------------

2.2.0

Update models

* You can pass the Problem dictionary or Problem object to the model.
* You can pass the Termination dictionary or Termination object to the model.
* The objective function is renamed as fitness function (obj_func -> fit_func)
* The general format of a solution is: **\[position, target\]**
* position: numpy vector (1-D array)
* target: **\[fitness, list_objectives\]**
* list_objectives: **\[objective 1, objective 2, ...\]**
* After the training process, everything can be accessed via the objective "history" (model.history)

* You can name your model and name your fitness function when creating a model
* model(epoch, pop_size, ...., name='your model name', fit_name='your fitness function name')
* Add new algorithms:
* Gradient-Based Optimizer (GBO) in math_based group
* Chaos Game Optimization (CGO) in math_based group
* Remove all dummy algorithms (Not supported anymore)
* Fix bugs:
* Find idx of min-distance in BRO algorithm
* Update more strategy for GA algorithm
* Update child selection process in MA algorithm

Update others

+ examples: Update several scenarios for mealpy with other frameworks
+ document: Add document website (https://mealpy.readthedocs.io/)

---------------------------------------------------------------------

Page 2 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.