Git Product home page Git Product logo

jenetics / jenetics Goto Github PK

View Code? Open in Web Editor NEW
822.0 822.0 150.0 82.08 MB

Jenetics - Genetic Algorithm, Genetic Programming, Grammatical Evolution, Evolutionary Algorithm, and Multi-objective Optimization

Home Page: https://jenetics.io

License: Apache License 2.0

Java 96.54% Shell 0.21% TeX 0.95% Gnuplot 0.48% HTML 0.02% Python 0.08% C++ 0.14% Batchfile 0.05% CSS 1.02% JavaScript 0.15% Kotlin 0.30% ANTLR 0.07%
artificial-intelligence evolutionary-algorithms evolutionary-strategy genetic-algorithm genetic-programming grammatical-evolution java java17 machine-learning metaheuristics multiobjective-optimization optimization parallel-algorithm

jenetics's Introduction

Jenetics

Build Status Maven Central Javadoc

Jenetics is a Genetic Algorithm, Evolutionary Algorithm, Grammatical Evolution, Genetic Programming, and Multi-objective Optimization library, written in modern day Java. It is designed with a clear separation of the several concepts of the algorithm, e.g. Gene, Chromosome, Genotype, Phenotype, Population and fitness Function. Jenetics allows you to minimize and maximize the given fitness function without tweaking it. In contrast to other GA implementations, the library uses the concept of an evolution stream (EvolutionStream) for executing the evolution steps. Since the EvolutionStream implements the Java Stream interface, it works smoothly with the rest of the Java Stream API.

Other languages

  • Jenetics.Net: Experimental .NET Core port in C# of the base library.
  • Helisa: Scala wrapper around the Jenetics library.

Documentation

The library is fully documented (javadoc) and comes with a user manual (pdf).

Build Jenetics

Jenetics requires at least Java 21 to compile and run.

Check out the master branch from GitHub.

$ git clone https://github.com/jenetics/jenetics.git <builddir>

Jenetics uses Gradle as build system and organizes the source into sub-projects (modules). Each subproject is located in its own subdirectory:

Published projects

The following projects/modules are also published to Maven.

  • jenetics Javadoc: This project contains the source code and tests for the Jenetics core-module.
  • jenetics.ext Javadoc: This module contains additional non-standard GA operations and data types. It also contains classes for solving multi-objective problems (MOEA) and doing Grammatical Evolution (GE).
  • jenetics.prog Javadoc: The modules contains classes which allows to do genetic programming (GP). It seamlessly works with the existing EvolutionStream and evolution Engine.
  • jenetics.xml Javadoc: XML marshalling module for the Jenetics base data structures.

Non-published projects

  • jenetics.example: This project contains example code for the core-module.
  • jenetics.doc: Contains the code of the web-site and the manual.
  • jenetics.tool: This module contains classes used for doing integration testing and algorithmic performance testing. It is also used for creating GA performance measures and creating diagrams from the performance measures.

For building the library change into the <builddir> directory (or one of the module directories) and call one of the available tasks:

  • compileJava: Compiles the Jenetics sources and copies the class files to the <builddir>/<module-dir>/build/classes/main directory.
  • jar: Compiles the sources and creates the JAR files. The artifacts are copied to the <builddir>/<module-dir>/build/libs directory.
  • javadoc: Generates the API documentation. The Javadoc is stored in the <builddir>/<module-dir>/build/docs directory
  • test: Compiles and executes the unit tests. The test results are printed onto the console, and a test-report, created by TestNG, is written to <builddir>/<module-dir> directory.
  • clean: Deletes the <builddir>/build/* directories and removes all generated artifacts.

For building the library jar from the source call

$ cd <build-dir>
$ ./gradlew jar

Example

Hello World (Ones counting)

The minimum evolution Engine setup needs a genotype factory, Factory<Genotype<?>>, and a fitness Function. The Genotype implements the Factory interface and can therefore be used as prototype for creating the initial Population and for creating new random Genotypes.

import io.jenetics.BitChromosome;
import io.jenetics.BitGene;
import io.jenetics.Genotype;
import io.jenetics.engine.Engine;
import io.jenetics.engine.EvolutionResult;
import io.jenetics.util.Factory;

public class HelloWorld {
    // 2.) Definition of the fitness function.
    private static Integer eval(Genotype<BitGene> gt) {
        return gt.chromosome()
            .as(BitChromosome.class)
            .bitCount();
    }

    public static void main(String[] args) {
        // 1.) Define the genotype (factory) suitable
        //     for the problem.
        Factory<Genotype<BitGene>> gtf =
            Genotype.of(BitChromosome.of(10, 0.5));

        // 3.) Create the execution environment.
        Engine<BitGene, Integer> engine = Engine
            .builder(HelloWorld::eval, gtf)
            .build();

        // 4.) Start the execution (evolution) and
        //     collect the result.
        Genotype<BitGene> result = engine.stream()
            .limit(100)
            .collect(EvolutionResult.toBestGenotype());

        System.out.println("Hello World:\n" + result);
    }
}

In contrast to other GA implementations, the library uses the concept of an evolution stream (EvolutionStream) for executing the evolution steps. Since the EvolutionStream implements the Java Stream interface, it works smoothly with the rest of the Java streaming API. Now let's have a closer look at the listing above and discuss this simple program step by step:

  1. The probably most challenging part, when setting up a new evolution Engine, is to transform the problem domain into a appropriate Genotype (factory) representation. In our example we want to count the number of ones of a BitChromosome. Since we are counting only the ones of one chromosome, we are adding only one BitChromosome to our Genotype. In general, the Genotype can be created with 1 to n chromosomes.

  2. Once this is done, the fitness function, which should be maximized, can be defined. Utilizing the new language features introduced in Java 8, we simply write a private static method, which takes the genotype we defined and calculates its fitness value. If we want to use the optimized bit-counting method, bitCount(), we have to cast the Chromosome<BitGene> class to the actual used BitChromosome class. Since we know for sure that we created the Genotype with a BitChromosome, this can be done safely. A reference to the eval method is then used as fitness function and passed to the Engine.build method.

  3. In the third step we are creating the evolution Engine, which is responsible for changing, respectively evolving, a given population. The Engine is highly configurable and takes parameters for controlling the evolutionary and the computational environment. For changing the evolutionary behavior, you can set different alterers and selectors. By changing the used Executor service, you control the number of threads; the Engine is allowed to use. A new Engine instance can only be created via its builder, which is created by calling the Engine.builder method.

  4. In the last step, we can create a new EvolutionStream from our Engine. The EvolutionStream is the model or view of the evolutionary process. It serves as a »process handle« and also allows you, among other things, to control the termination of the evolution. In our example, we simply truncate the stream after 100 generations. If you don't limit the stream, the EvolutionStream will not terminate and run forever. Since the EvolutionStream extends the java.util.stream.Stream interface, it integrates smoothly with the rest of the Java Stream API. The final result, the best Genotype in our example, is then collected with one of the predefined collectors of the EvolutionResult class.

Evolving images

This example tries to approximate a given image by semitransparent polygons. It comes with a Swing UI, where you can immediately start your own experiments. After compiling the sources with

$ ./gradlew compileTestJava

you can start the example by calling

$ ./jrun io.jenetics.example.image.EvolvingImages

Evolving images

The previous image shows the GUI after evolving the default image for about 4,000 generations. With the »Open« button, it is possible to load other images for polygonization. The »Save« button allows storing polygonized images in PNG format to disk. At the button of the UI, you can change some GA parameters of the example.

Projects using Jenetics

  • SPEAR: SPEAR (Smart Prognosis of Energy with Allocation of Resources) created an extendable platform for energy and efficiency optimizations of production systems.
  • Renaissance Suite: Renaissance is a modern, open, and diversified benchmark suite for the JVM, aimed at testing JIT compilers, garbage collectors, profilers, analyzers and other tools.
  • APP4MC: Eclipse APP4MC is a platform for engineering embedded multi- and many-core software systems.

Blogs and articles

Citations

Milan Čugurović, Milena Vujošević Janičić, Vojin Jovanović, Thomas Würthinger. GraalSP: Polyglot, efficient, and robust machine learning-based static profiler. Journal of Systems and Software, Volume 213, 2024, 112058, ISSN 0164-1212. July 2024.

...

  1. Milan Čugurović, Milena Vujošević Janičić, Vojin Jovanović, Thomas Würthinger. GraalSP: Polyglot, efficient, and robust machine learning-based static profiler. Journal of Systems and Software, Volume 213, 2024, 112058, ISSN 0164-1212. July. 2024.
  2. Wenwen Feng, Xiaohui Lei, Yunzhong Jiang, Chao Wang, Weihong Liao, Hao Wang, Gong Xinghui, Yu Feng. Coupling model predictive control and rules-based control for real-time control of urban river systems. Journal of Hydrology, 2024, 131228, ISSN 0022-1694. April 2024.
  3. S. Sint, A. Mazak-Huemer, M. Eisenberg, D. Waghubinger and M. Wimmer. Automatic Optimization of Tolerance Ranges for Model-Driven Runtime State Identification. IEEE Transactions on Automation Science and Engineering. April. 2024.
  4. Cicirello, Vincent A. Evolutionary Computation: Theories, Techniques, and Applications. Applied Sciences 14, no. 6: 2542. Mar. 2024.
  5. Koitz-Hristov R, Sterner T, Stracke L, Wotawa F. On the suitability of checked coverage and genetic parameter tuning in test suite reduction. J Softw Evol Proc. 2024;e2656. Feb. 2024.
  6. Jordão, Rodolfo; Becker, Matthias; Sander, Ingo. IDeSyDe: Systematic Design Space Exploration via Design Space Identification. ACM Transactions on Design Automation of Electronic Systems. Feb. 2024.
  7. Squillero, G., Tonda, A. Veni, Vidi, Evolvi commentary on W. B. Langdon’s “Jaws 30”. Genet Program Evolvable Mach 24, 24 (2023) Nov. 2023.
  8. Eneko Osaba, Gorka Benguria, Jesus L. Lobo, Josu Diaz-de-Arcaya, Juncal Alonso, Iñaki Etxaniz. Optimizing IaC Configurations: a Case Study Using Nature-inspired Computing. CIIS 2023. Nov. 2023.
  9. Sapra, D., Pimentel, A.D. Exploring Multi-core Systems with Lifetime Reliability and Power Consumption Trade-offs. Embedded Computer Systems: Architectures, Modeling, and Simulation. SAMOS 2023. Lecture Notes in Computer Science, vol 14385. Springer, Cham. Nov. 2023.
  10. Syed Juned Ali, Jan Michael Laranjo, Dominik Bork. A Generic and Customizable Genetic Algorithms-based Conceptual Model Modularization Framework. 27th International EDOC Conference (EDOC 2023) - Enterprise Design, Operations and Computing. Sep. 2023.
  11. A. Elyasaf, E. Farchi, O. Margalit, G. Weiss and Y. Weiss. Generalized Coverage Criteria for Combinatorial Sequence Testing. IEEE Transactions on Software Engineering, vol. 49, no. 08, pp. 4023-4034. Aug. 2023.
  12. Julien Amblard, Robert Filman, Gabriel Kopito. GPStar4: A flexible framework for experimenting with genetic programming. OGECCO '23 Companion: Proceedings of the Companion Conference on Genetic and Evolutionary Computation. July 2023.
  13. Garmendia, A., Bork, D., Eisenberg, M., Ferreira, T., Kessentini, M., Wimmer, M. Leveraging Artificial Intelligence for Model-based Software Analysis and Design. Optimising the Software Development Process with Artificial Intelligence. Natural Computing Series. Springer, Singapore. July 2023.
  14. Sikora, M., Smołka, M. An Application of Evolutionary Algorithms and Machine Learning in Four-Part Harmonization. Computational Science – ICCS 2023. ICCS 2023. Lecture Notes in Computer Science, vol 14073. Springer June 2023.
  15. Dolly Sapra and Andy D. Pimentel. Exploring Multi-core Systems with Lifetime Reliability and Power Consumption Trade-offs. SAMOS '23. May 2023.
  16. Vipin Shukla, Mainak Bandyopadhyay. Optimization of input parameters of ANN–driven plasma source through nature-inspired evolutionary algorithms. Intelligent Systems with Applications, Volume 18, 2023, 200200, ISSN 2667-3053. May 2023.
  17. P. Feichtenschlager, K. Schuetz, S. Jaburek, C. Schuetz, E. Gringinger. Privacy-Preserving Implementation of an Auction Mechanism for ATFM Slot Swapping. Proceedings of the 23rd Integrated Communications, Navigation and Surveillance Conference (ICNS 2023), Washington D.C., U.S.A., April 18-20, 2023, IEEE Press, 12 pages. April 2023.
  18. Christoph Laaber, Tao Yue, Shaukat Ali. Multi-Objective Search-Based Software Microbenchmark Prioritization. ArXiv/Computer Science/Software Engineering. Nov. 2022.
  19. Ricardo Ferreira Vilela, João Choma Neto, Victor Hugo Santiago Costa Pinto, Paulo Sérgio Lopes de Souza, Simone do Rocio Senger de Souza. Bio-inspired optimization to support the test data generation of concurrent software. Concurrency and Computation: Practice and Experience. Nov. 2022.
  20. G. Mateeva, D. Parvanov, I. Dimitrov, I. Iliev and T. Balabanov. An Efficiency of Third Party Genetic Algorithms Software Libraries in Mobile Distributed Computing for Financial Time Series Forecasting. 2022 International Conference Automatics and Informatics (ICAI). Oct. 2022.
  21. Guilherme Espada, Leon Ingelse, Paulo Canelas, Pedro Barbosa, Alcides Fonseca. Data types as a more ergonomic frontend for Grammar-Guided Genetic Programming. arXiv. Oct. 2022.
  22. Christoph G. Schuetz, Thomas Lorünser, Samuel Jaburek, Kevin Schuetz, Florian Wohner, Roman Karl & Eduard Gringinger. A Distributed Architecture for Privacy-Preserving Optimization Using Genetic Algorithms and Multi-party Computation. CoopIS 2022: Cooperative Information Systems pp 168–185. Sep. 2022.
  23. Christina Plump, Bernhard J. Berger, Rolf Drechsler. Using density of training data to improve evolutionary algorithms with approximative fitness functions. WCCI2022 IEEE WORLD CONGRESS ON COMPUTATIONAL INTELLIGENCE. July 2022.
  24. Christina Plump, Bernhard J. Berger, Rolf Drechsler. Adapting mutation and recombination operators to range-aware relations in real-world application data. GECCO '22: Proceedings of the Genetic and Evolutionary Computation Conference Companion. Pages 755–758. July 2022.
  25. Eric Medvet, Giorgia Nadizar, Luca Manzoni. JGEA: a modular java framework for experimenting with evolutionary computation. GECCO '22: Proceedings of the Genetic and Evolutionary Computation Conference Companion. Pages 2009–2018. July 2022.
  26. Moshe Sipper, Tomer Halperin, Itai Tzruia, Achiya Elyasaf. EC-KitY: Evolutionary Computation Tool Kit in Python with Seamless Machine Learning Integration. arXiv:2207.10367v1 [cs.NE]. July 2022.
  27. A. Billedeaux and B. DeVries. Using Metamorphic Relationships and Genetic Algorithms to Test Open-Source Software. 2022 IEEE International Conference on Electro Information Technology (eIT), 2022, pp. 342-345. July 2022.
  28. R. Koitz-Hristov, L. Stracke and F. Wotawa. Checked Coverage for Test Suite Reduction – Is It Worth the Effort? 2022 IEEE/ACM International Conference on Automation of Software Test (AST), pp. 6-16. June 2022.
  29. Abdessamed Ouessai, Mohammed Salem, Antonio M. Mora. Evolving action pre-selection parameters for MCTS in real-time strategy games. Entertainment Computing, Volume 42. April 2022.
  30. Musatafa Abbas Abbood Albadr, Sabrina Tiun, Masri Ayob, Fahad Taha AL-Dhief, Khairuddin Omar & Mhd Khaled Maen. Speech emotion recognition using optimized genetic algorithm-extreme learning machine. Multimedia Tools and Applications, March 2022.
  31. Christina Plump, Bernhard Berger, Rolf Drechsler. Choosing the right technique for the right restriction - a domain-specific approach for enforcing search-space restrictions in evolutionary algorithms. LDIC-2022, International Conference on Dynamics in Logistics, Feb. 2022.
  32. Quoc Nhat Han Tran, Nhan Quy Nguyen, Hicham Chehade, Lionel Amodeo, Farouk Yalaoui. Outpatient Appointment Optimization: A Case Study of a Chemotherapy Service. Applied Sciences/Computing and Artificial Intelligence. Jan. 2022.
  33. Achiya Elyasaf, Eitan Farchi, Oded Margalit, Gera Weiss, Yeshayahu Weiss. Combinatorial Sequence Testing Using Behavioral Programming and Generalized Coverage Criteria. Journal of Systems and Software. Jan. 2022.
  34. Frequentis Group. D4.1 Report on State-ofthe-Art of Relevant Concepts. SLOTMACHINE - RESULTS & PUBLIC DELIVERABLES, Frequentis Dec. 2021.
  35. Huang Wanjie, Wang Haotian, Xue Yibo. Research on Optimization of in-warehouse picking Model based on genetic algorithm. 2021 International Conference on Information Technology, Education and Development (ICITED 2021). Dec. 2021.
  36. Aalam Z., Kaur S., Vats P., Kaur A., Saxena R. A Comprehensive Analysis of Testing Efforts Using the Avisar Testing Tool for Object Oriented Softwares. Intelligent Sustainable Systems. Lecture Notes in Networks and Systems, vol 334. Springer, Singapore. Dec. 2021.
  37. Anh Vu Vo, Debra F. Laefer, Jonathan Byrne. Optimizing Urban LiDAR Flight Path Planning Using a Genetic Algorithm and a Dual Parallel Computing Framework. Remote Sensing, Volume 13, Issue 21. Nov. 2021.
  38. Pozas N., Durán F. On the Scalability of Compositions of Service-Oriented Applications. ICSOC 2021: Service-Oriented Computing pp 449-463 Nov. 2021.
  39. Küster, T., Rayling, P., Wiersig, R. et al. Multi-objective optimization of energy-efficient production schedules using genetic algorithms. Optimization and Engineering (2021). Oct. 2021.
  40. B. DeVries and C. Trefftz. A Novelty Search and Metamorphic Testing Approach to Automatic Test Generation. 2021 IEEE/ACM 14th International Workshop on Search-Based Software Testing (SBST), 2021, pp. 8-11. May 2021.
  41. W. Geithner, Z. Andelkovic, O. Geithner, F. Herfurth, V. Rapp, A. Németh, F. Wilhelmstötter, A. H. Van Benschoten. ION SOURCE OPTIMIZATION USING BI-OBJECTIVE GENETIC AND MATRIX-PROFILE ALGORITHM. IPAC2021 - 12th International Particle Accelerator Conference. May 2021.
  42. C. Plump, B. J. Berger and R. Drechsler. Domain-driven Correlation-aware Recombination and Mutation Operators for Complex Real-world Applications. 2021 IEEE Congress on Evolutionary Computation (CEC), pp. 540-548. July 2021.
  43. Sapra, D., Pimentel, A.D. Designing convolutional neural networks with constrained evolutionary piecemeal training. Appl Intell (2021). July 2021.
  44. Michela Lorandi, Leonardo Lucio Custode, Giovanni Iacca. Genetic improvement of routing in delay tolerant networks. GECCO '21: Proceedings of the Genetic and Evolutionary Computation Conference Companion. July 2021, Pages 35–36.
  45. Plump, Christina and Berger, Bernhard J. and Drechsler, Rolf. Improving evolutionary algorithms by enhancing an approximative fitness function through prediction intervals. IEEE Congress on Evolutionary Computation (IEEE CEC-2021). June 2021.
  46. Faltaous, Sarah, Abdulmaksoud, Aya, Kempe, Markus, Alt, Florian and Schneegass, Stefan. GeniePutt: Augmenting human motor skills through electrical muscle stimulation. it - Information Technology, vol. , no. , 2021. May 2021.
  47. Yiming Tang, Raffi Khatchadourian, Mehdi Bagherzadeh, Rhia Singh, Ajani Stewart, and Anita Raja. An Empirical Study of Refactorings and Technical Debt in Machine Learning Systems. In International Conference on Software Engineering, ICSE ’21. May 2021.
  48. Arifin H.H., Robert Ong H.K., Dai J., Daphne W., Chimplee N. Model-Based Product Line Engineering with Genetic Algorithms for Automated Component Selection. In: Krob D., Li L., Yao J., Zhang H., Zhang X. (eds) Complex Systems Design & Management. Springer, Cham. April 2021.
  49. MICHELA LORANDI, LEONARDO LUCIO CUSTODE, and GIOVANNI IACCA. Genetic Improvement of Routing Protocols for DelayTolerant Networks. arXiv:2103.07428v1 March 2021.
  50. Amine Aziz-Alaoui, Carola Doerr, Johann Dreo. Towards Large Scale Automated Algorithm Designby Integrating Modular Benchmarking Frameworks. E arXiv:2102.06435 Feb. 2021.
  51. Dominik Bork and Antonio Garmendia and Manuel Wimmer. Towards a Multi-Objective Modularization Approach for Entity-Relationship Models. ER 2020, 39th International Conference on Conceptual Modeling. Nov. 2020.
  52. Sarfarazi, S.; Deissenroth-Uhrig, M.; Bertsch, V. Aggregation of Households in Community Energy Systems: An Analysis from Actors’ and Market Perspectives. Energies 2020, 13, 5154. Oct. 2020.
  53. M. Šipek, D. Muharemagić, B. Mihaljević and A. Radovan. Enhancing Performance of Cloud-based Software Applications with GraalVM and Quarkus. 2020 43rd International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 2020, pp. 1746-1751. Oct. 2020.
  54. Vats P., Mandot M. A Comprehensive Analysis for Validation of AVISAR Object-Oriented Testing Tool. Joshi A., Khosravy M., Gupta N. (eds) Machine Learning for Predictive Analysis. Lecture Notes in Networks and Systems, vol 141. Springer, Singapore. Oct. 2020.
  55. Thakur, K., Kumar, G. Nature Inspired Techniques and Applications in Intrusion Detection Systems: Recent Progress and Updated Perspective. Archives of Computational Methods in Engineering (2020). Aug. 2020.
  56. Nur Hidayah Mat Yasin, Abdul Sahli Fakhrudin, Abdul Wafie Afnan Abdul Hadi, Muhammad Harith Mohd Khairuddin, Noor Raihana Abu Sepian, Farhan Mohd Said, Norazwina Zainol. Comparison of Response Surface Methodology and Artificial Neural Network for the Solvent Extraction of Fatty Acid Methyl Ester from Fish Waste. International Journal of Modern Agriculture, Volume 9, No.3, 2020, ISSN: 2305-7246. Sep. 2020.
  57. Cicirello, V. A. Chips-n-Salsa: A Java Library of Customizable, Hybridizable, Iterative, Parallel, Stochastic, and Self-Adaptive Local Search Algorithms. Journal of Open Source Software, 5(52), 2448. Aug. 2020.
  58. Li, Yuanyuan; Carabelli, Stefano;Fadda, Edoardo; Manerba, Daniele; Tadei, Roberto; Terzo, Olivier. Machine Learning and Optimization for Production Rescheduling in Industry 4.0. THE INTERNATIONAL JOURNAL OF ADVANCED MANUFACTURING TECHNOLOGY. - ISSN 1433-3015. Aug. 2020.
  59. Dolly Sapra and Andy D. Pimentel. An Evolutionary Optimization Algorithm for GraduallySaturating Objective Functions. GECCO ’20, Cancún, Mexico. July. 2020.
  60. Dolly Sapra and Andy D. Pimentel. Constrained Evolutionary Piecemeal Training to Design Convolutional Neural Networks. IEA/AIE 2020 – Kitakyushu, Japan. July. 2020.
  61. Femi Emmanuel Ayo, Sakinat Oluwabukonla Folorunso, Adebayo A. Abayomi-Alli, Adebola Olayinka Adekunle, Joseph Bamidele Awotunde. Network intrusion detection based on deep learning model optimized with rule-based hybrid feature selection. Information Security Journal: A Global Perspective. May 2020.
  62. Zainol N., Fakharudin A.S., Zulaidi N.I.S. Model Optimization Using Artificial Intelligence Algorithms for Biological Food Waste Degradation. Yaser A. (eds) Advances in Waste Processing Technology. Springer, Singapore. May 2020.
  63. Sonya Voneva, Manar Mazkatli, Johannes Grohmann and Anne Koziolek. Optimizing Parametric Dependencies forIncremental Performance Model Extraction. Karlsruhe Institute of Technology, Karlsruhe, Germany. April. 2020.
  64. Raúl Lara-Cabrera, Ángel González-Prieto, Fernando Ortega and Jesús Bobadilla. Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming. MDPI, Applied Sciences. Feb. 2020.
  65. Humm B.G., Hutter M. Learning Patterns for Complex Event Detection in Robot Sensor Data. Optimization and Learning. OLA 2020. Communications in Computer and Information Science, vol 1173. Springer Feb. 2020.
  66. Erich C. Teppan, Giacomo Da Col. Genetic Algorithms for Creating Large Job Shop Dispatching Rules. Advances in Integrations of Intelligent Methods. Smart Innovation, Systems and Technologies, vol 170. Springer, Singapore. Jan. 2020.
  67. Ricardo Pérez-Castillo, Francisco Ruiz, Mario Piattini. A decision-making support system for Enterprise Architecture Modelling. Decision Support Systems. Jan. 2020.
  68. Sabrina Appel, Wolfgang Geithner, Stephan Reimann, Mariusz Sapinski, Rahul Singh and Dominik Vilsmeier. Application of nature-inspired optimization algorithms and machine learning for heavy-ion synchrotrons. International Journal of Modern Physics A. Dec. 2019.
  69. O. M. Elzeki, M. F. Alrahmawy, Samir Elmougy. A New Hybrid Genetic and Information Gain Algorithm for Imputing Missing Values in Cancer Genes Datasets. PInternational Journal of Intelligent Systems and Applications (IJISA), Vol.11, No.12, pp.20-33, DOI: 10.5815/ijisa.2019.12.03. Dec. 2019.
  70. Oliver Strauß, Ahmad Almheidat and Holger Kett. Applying Heuristic and Machine Learning Strategies to ProductResolution. Proceedings of the 15th International Conference on Web Information Systems and Technologies (WEBIST 2019), pages 242-249. Nov. 2019.
  71. Yuanyuan Li, Stefano Carabelli, Edoardo Fadda, Daniele Manerba, Roberto Tadei1 and Olivier Terzo. Integration of Machine Learning and OptimizationTechniques for Flexible Job-Shop Rescheduling inIndustry 4.0. Politecnico di Torino, Operations Research and Optimization Group. Oct. 2019.
  72. Höttger R., Igel B., Spinczyk O. Constrained Software Distribution for Automotive Systems. Communications in Computer and Information Science, vol 1078. Oct. 2019.
  73. Jin-wooLee, Gwangseon Jang, Hohyun Jung, Jae-Gil Lee, Uichin Lee. Maximizing MapReduce job speed and reliability in the mobile cloud by optimizing task allocation. Pervasive and Mobile Computing. Oct. 2019.
  74. Krawczyk, Lukas, Mahmoud Bazzal, Ram Prasath Govindarajan and Carsten Wolff. Model-Based Timing Analysis and Deployment Optimization for Heterogeneous Multi-core Systems using Eclipse APP4MC. 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion: 44-53. Sep. 2019.
  75. Junio Cezar Ribeiro da Silva, Lorena Leão, Vinicius Petrucci, Abdoulaye Gamatié, Fernando MagnoQuintao Pereira. Scheduling in Heterogeneous Architectures via Multivariate Linear Regression on Function Inputs. lirmm-02281112. Sep. 2019.
  76. Eric O. Scott, Sean Luke. ECJ at 20: toward a general metaheuristics toolkit. GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference Companion, Pages 1391–1398. July 2019.
  77. Francisco G. Montoya and Raúl Baños Navarro (Eds.). Optimization Methods Applied to Power Systems, Volume 2. MDPI Books, ISBN 978-3-03921-156-2. July 2019.
  78. Höttger, Robert & Ki, Junhyung & Bui, Bao & Igel, Burkhard & Spinczyk, Olaf. CPU-GPU Response Time and Mapping Analysis for High-Performance Automotive Systems. 10th International Workshop on Analysis Tools and Methodologies for Embedded and Real-time Systems (WATERS) co-located with the 31st Euromicro Conference on Real-Time Systems (ECRTS'19). July 2019.
  79. Maxime Cordy, Steve Muller, Mike Papadakis, and Yves Le Traon. Search-based test and improvement of machine-learning-based anomaly detection systems. Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2019). ACM, New York, NY, USA, 158-168. July 2019.
  80. Michael Vistein, Jan Faber, Clemens Schmidt-Eisenlohr, Daniel Reiter. Automated Handling of Auxiliary Materials using a Multi-Kinematic Gripping System. Procedia Manufacturing Volume 38, 2019, Pages 1276-1283. June 2019.
  81. Nikolaos Nikolakis, Ioannis Stathakis, Sotirios Makris. On an evolutionary information system for personalized support to plant operators. 52nd CIRP Conference on Manufacturing Systems (CMS), Ljubljana, Slovenia. June 2019.
  82. Michael Trotter, Timothy Wood and Jinho Hwang. Forecasting a Storm: Divining Optimal Configurations using Genetic Algorithms and Supervised Learning. 13th IEEE International Conference on Self-Adaptive and Self-Organizing Systems (SASO 2019). June 2019.
  83. Krawczyk, Lukas & Bazzal, Mahmoud & Prasath Govindarajan, Ram & Wolff, Carsten. An analytical approach for calculating end-to-end response times in autonomous driving applications. 10th International Workshop on Analysis Tools and Methodologies for Embedded and Real-time Systems (WATERS 2019). June 2019.
  84. Rodolfo Ayala Lopes, Thiago Macedo Gomes, and Alan Robert Resende de Freitas. A symbolic evolutionary algorithm software platform. Proceedings of the Genetic and Evolutionary Computation Conference Companion (GECCO '19). July 2019.
  85. Aleksandar Prokopec, Andrea Rosà, David Leopoldseder, Gilles Duboscq, Petr Tůma, Martin Studener, Lubomír Bulej, Yudi Zheng, Alex Villazón, Doug Simon, Thomas Würthinger, Walter Binder. Renaissance: Benchmarking Suite for Parallel Applications on the JVM. PLDI ’19, Phoenix, AZ, USA. June 2019.
  86. Robert Höttger, Lukas Krawczyk, Burkhard Igel, Olaf Spinczyk. Memory Mapping Analysis for Automotive Systems. Brief Presentations Proceedings (RTAS 2019). Apr. 2019.
  87. Al Akkad, M. A., & Gazimzyanov, F. F. AUTOMATED SYSTEM FOR EVALUATING 2D-IMAGE COMPOSITIONAL CHARACTERISTICS: CONFIGURING THE MATHEMATICAL MODEL. Intellekt. Sist. Proizv., 17(1), 26-33. doi: 10.22213/2410-9304-2019-1-26-33. Apr. 2019.
  88. Alcayde, A.; Baños, R.; Arrabal-Campos, F.M.; Montoya, F.G. Optimization of the Contracted Electric Power by Means of Genetic Algorithms. Energies, Volume 12, Issue 7, Apr. 2019.
  89. Abdul Sahli Fakharudin, Norazwina Zainol, Zulsyazwan Ahmad Khushairi. Modelling and Optimisation of Oil Palm Trunk Core Biodelignification using Neural Network and Genetic Algorithm. IEEA '19: Proceedings of the 8th International Conference on Informatics, Environment, Energy and Applications; Pages 155–158, Mar. 2019.
  90. Aleksandar Prokopec, Andrea Rosà, David Leopoldseder, Gilles Duboscq, Petr Tůma, Martin Studener, Lubomír Bulej, Yudi Zheng, Alex Villazón, Doug Simon, Thomas Wuerthinger, Walter Binder. On Evaluating the Renaissance Benchmarking Suite: Variety, Performance, and Complexity. Cornell University: Programming Languages, Mar. 2019.
  91. S. Appel, W. Geithner, S. Reimann, M Sapinski, R. Singh, D. M. Vilsmeier OPTIMIZATION OF HEAVY-ION SYNCHROTRONS USINGNATURE-INSPIRED ALGORITHMS AND MACHINE LEARNING.13th Int. Computational Accelerator Physics Conf., Feb. 2019.
  92. Saad, Christian, Bernhard Bauer, Ulrich R Mansmann, and Jian Li. AutoAnalyze in Systems Biology. Bioinformatics and Biology Insights, Jan. 2019.
  93. Gandeva Bayu Satrya, Soo Young Shin. Evolutionary Computing Approach to Optimize Superframe Scheduling on Industrial Wireless Sensor Networks. Cornell University, Dec. 2018.
  94. H.R. Maier, S. Razavi, Z. Kapelan, L.S. Matott, J. Kasprzyk, B.A. Tolson. Introductory overview: Optimization using evolutionary algorithms and other metaheuristics. Environmental Modelling & Software, Dec. 2018.
  95. Erich C. Teppan and Giacomo Da Col. Automatic Generation of Dispatching Rules for Large Job Shops by Means of Genetic Algorithms. CIMA 2018, International Workshop on Combinations of Intelligent Methods and Applications, Nov. 2018.
  96. Pasquale Salzaa, Filomena Ferrucci. Speed up genetic algorithms in the cloud using software containers. Future Generation Computer Systems, Oct. 2018.
  97. Ghulam Mubashar Hassan and Mark Reynolds. Genetic Algorithms for Scheduling and Optimization of Ore Train Networks. GCAI-2018. 4th Global Conference on Artificial Intelligence, Sep. 2018.
  98. Drezewski, Rafal & Kruk, Sylwia & Makowka, Maciej. The Evolutionary Optimization of a Company’s Return on Equity Factor: Towards the Agent-Based Bio-Inspired System Supporting Corporate Finance Decisions. IEEE Access. 6. 10.1109/ACCESS.2018.2870201, Sep. 2018.
  99. Arifin, H. H., Chimplee, N. , Kit Robert Ong, H. , Daengdej, J. and Sortrakul, T. Automated Component‐Selection of Design Synthesis for Physical Architecture with Model‐Based Systems Engineering using Evolutionary Trade‐off. INCOSE International Symposium, 28: 1296-1310, Aug. 2018.
  100. Ong, Robert & Sortrakul, Thotsapon. Comparison of Selection Methods of Genetic Algorithms for Automated Component-Selection of Design Synthesis with Model-Based Systems Engineering. Conference: I-SEEC 2018, May 2018.
  101. Stephan Pirnbaum. Die Evolution im Algorithmus - Teil 2: Multikriterielle Optimierung und Architekturerkennung. JavaSPEKTRUM 03/2018, pp 66–69, May 2018.
  102. W. Geithner, Z. Andelkovic, S. Appel, O. Geithner, F. Herfurth, S. Reimann, G. Vorobjev, F. Wilhelmstötter. Genetic Algorithms for Machine Optimization in the Fair Control System Environment. The 9th International Particle Accelerator Conference (IPAC'18), May 2018.
  103. Stephan Pirnbaum. Die Evolution im Algorithmus - Teil 1: Grundlagen. JavaSPEKTRUM 01/2018, pp 64–68, Jan. 2018.
  104. Alexander Felfernig, Rouven Walter, José A. Galindo, David Benavides, Seda Polat Erdeniz, Müslüm Atas, Stefan Reiterer. Anytime diagnosis for reconfiguration. Journal of Intelligent Information Systems, pp 1–22, Jan. 2018.
  105. Bruce A. Johnson. From Raw Data to Protein Backbone Chemical Shifts Using NMRFx Processing and NMRViewJ Analysis. Protein NMR: Methods and Protocols, pp. 257--310, Springer New York, Nov. 2017.
  106. Cuadra P., Krawczyk L., Höttger R., Heisig P., Wolff C. Automated Scheduling for Tightly-Coupled Embedded Multi-core Systems Using Hybrid Genetic Algorithms. Information and Software Technologies: 23rd International Conference, ICIST 2017, Druskininkai, Lithuania. Communications in Computer and Information Science, vol 756. Springer, Cham, Sep. 2017.
  107. Michael Trotter, Guyue Liu, Timothy Wood. Into the Storm: Descrying Optimal Configurations Using Genetic Algorithms and Bayesian Optimization. Foundations and Applications of Self* Systems (FAS*W), 2017 IEEE 2nd International Workshops Sep. 2017.
  108. Emna Hachicha, Karn Yongsiriwit, Mohamed Sellami. Genetic-Based Configurable Cloud Resource Allocation in QoS-Aware Business Process Development. Information and Software Technologies: 23rd International Conference, ICIST 2017, Druskininkai, Lithuania. Web Services (ICWS), 2017 IEEE International Conference, Jun. 2017.
  109. Abraão G. Nazário, Fábio R. A. Silva, Raimundo Teive, Leonardo Villa, Antônio Flávio, João Zico, Eire Fragoso, Ederson F. Souza. Automação Domótica Simulada Utilizando Algoritmo Genético Especializado na Redução do Consumo de Energia. Computer on the Beach 2017 pp. 180-189, March 2017.
  110. Bandaru, S. and Deb, K. Metaheuristic Techniques. Decision Sciences. CRC Press, pp. 693-750, Nov. 2016.
  111. Lyazid Toumi, Abdelouahab Moussaoui, and Ahmet Ugur. EMeD-Part: An Efficient Methodology for Horizontal Partitioning in Data Warehouses. Proceedings of the International Conference on Intelligent Information Processing, Security and Advanced Communication. Djallel Eddine Boubiche, Faouzi Hidoussi, and Homero Toral Cruz (Eds.). ACM, New York, NY, USA, Article 43, 7 pages, 2015.
  112. Andreas Holzinger (Editor), Igo Jurisica (Editor). Interactive Knowledge Discovery and Data Mining in Biomedical Informatics. Lecture Notes in Computer Science, Vol. 8401. Springer, 2014.
  113. Lyazid Toumi, Abdelouahab Moussaoui, Ahmet Ugur. Particle swarm optimization for bitmap join indexes selection problem in data warehouses. The Journal of Supercomputing, Volume 68, Issue 2, pp 672-708, May 2014.
  114. TANG Yi (Guangzhou Power Supply Bureau Limited, Guangzhou 511400, China) Study on Object-Oriented Reactive Compensation Allocation Optimization Algorithm for Distribution Networks, Oct. 2012.
  115. John M. Linebarger, Richard J. Detry, Robert J. Glass, Walter E. Beyeler, Arlo L. Ames, Patrick D. Finley, S. Louise Maffitt. Complex Adaptive Systems of Systems Engineering Environment Version 1.0. SAND REPORT, Feb. 2012.

Release notes

Improvements

  • Java 21 is used for building and using the library.
  • #878: Allow Virtual-Threads evaluating the fitness function. Must be enabled when creating an Engine (see code snippet below), the previous behaviour has been preserverd.
final Engine<DoubleGene, Double> engine = Engine.builder(ff)
	.fitnessExecutor(BatchExecutor.ofVirtualThreads())
	.build();
  • #880: Replace code examples in Javadoc with JEP 413.
  • #886: Improve CharStore sort.
  • #894: New genetic operators: ShiftMutator, ShuffleMutator and UniformOrderBasedCrossover.
  • #895: Improve default RandomGenerator selection. The used RandomGenerator is selected in the following order:
    1. Check if the io.jenetics.util.defaultRandomGenerator start parameter is set. If so, take this generator.
    2. Check if the L64X256MixRandom generator is available. If so, take this generator.
    3. Find the best available random generator according to the RandomGeneratorFactory.stateBits() value.
    4. Use the Random generator if no best generator can be found. This generator is guaranteed to be available on every platform.

All Release Notes

License

The library is licensed under the Apache License, Version 2.0.

Copyright 2007-2024 Franz Wilhelmstötter

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Used software

IntelliJ

SmartGit

jenetics's People

Contributors

alex-cornejo avatar bcomisky avatar beatngu13 avatar bfergerson avatar carldea avatar garar avatar gc-garcol avatar ivan-osipov avatar jenetics avatar kartikchugh avatar minor-change avatar n1ay avatar netomi avatar paul2803-byte avatar travisfw avatar xavier-fernandez avatar xcorail avatar zsoltk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jenetics's Issues

Engine deadlock for long running fitness functions

For long running fitness functions, the Engine might get stuck in the Phenotype.run() function.

"ForkJoinPool.commonPool-worker-13" #14 daemon prio=5 os_prio=0 tid=0x00007ff3401c7000 nid=0x52ec waiting on condition [0x00007ff312a21000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000007229e13a0> (a java.util.concurrent.CompletableFuture$Signaller)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
    at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3310)
    at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1721)
    at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1926)
    at org.jenetics.engine.Engine.evolve(Engine.java:303)
    at org.jenetics.engine.Engine$$Lambda$38/596512129.apply(Unknown Source)
    at org.jenetics.engine.EvolutionSpliterator.tryAdvance(EvolutionSpliterator.java:68)
    at java.util.Spliterator.forEachRemaining(Spliterator.java:326)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.jenetics.engine.StreamProxy.collect(StreamProxy.java:83)
    at org.jenetics.optimizer.EngineOptimizer.opt(EngineOptimizer.java:123)
    at org.jenetics.optimizer.EngineOptimizer$$Lambda$24/1198108795.apply(Unknown Source)
    at java.util.function.Function.lambda$andThen$6(Function.java:88)
    at java.util.function.Function$$Lambda$25/214126413.apply(Unknown Source)
    at org.jenetics.Phenotype.eval(Phenotype.java:137)
    - locked <0x0000000722d92318> (a org.jenetics.Phenotype)
    at org.jenetics.Phenotype.evaluate(Phenotype.java:130)
    at org.jenetics.Phenotype.run(Phenotype.java:150)
    at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:73)
    at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
    at java.util.concurrent.ForkJoinTask.invokeAll(ForkJoinTask.java:759)
    at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:77)
    at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

"ForkJoinPool.commonPool-worker-4" #13 daemon prio=5 os_prio=0 tid=0x00007ff2b0001000 nid=0x52eb waiting on condition [0x00007ff312b22000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x0000000722648a30> (a java.util.concurrent.CompletableFuture$Signaller)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
    at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3310)
    at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1721)
    at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1926)
    at org.jenetics.engine.Engine.evolve(Engine.java:303)
    at org.jenetics.engine.Engine$$Lambda$38/596512129.apply(Unknown Source)
    at org.jenetics.engine.EvolutionSpliterator.tryAdvance(EvolutionSpliterator.java:68)
    at java.util.Spliterator.forEachRemaining(Spliterator.java:326)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.jenetics.engine.StreamProxy.collect(StreamProxy.java:83)
    at org.jenetics.optimizer.EngineOptimizer.opt(EngineOptimizer.java:123)
    at org.jenetics.optimizer.EngineOptimizer$$Lambda$24/1198108795.apply(Unknown Source)
    at java.util.function.Function.lambda$andThen$6(Function.java:88)
    at java.util.function.Function$$Lambda$25/214126413.apply(Unknown Source)
    at org.jenetics.Phenotype.eval(Phenotype.java:137)
    - locked <0x0000000722d63fb0> (a org.jenetics.Phenotype)
    at org.jenetics.Phenotype.evaluate(Phenotype.java:130)
    at org.jenetics.Phenotype.run(Phenotype.java:150)
    at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:73)
    at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool.helpStealer(ForkJoinPool.java:1955)
    at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2044)
    at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390)
    at java.util.concurrent.ForkJoinTask.invokeAll(ForkJoinTask.java:761)
    at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:77)
    at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Inefficient thread utilization

If the Executor of the evolution Engine is set to a different value than a ForkJoinPool, the thread utilization is far below then expected. Setting the executor to a fixed thread pool,

Engine
    .builder(knapsack.function(), knapsack.genotype())
    .populationSize(150)
    .survivorsSelector(new TournamentSelector<>(5))
    .offspringSelector(new RouletteWheelSelector<>())
    .alterers(
        new Mutator<>(0.03),
        new SinglePointCrossover<>(0.125))
    .executor(Executors.newFixedThreadPool(6))
    .build();

the threads will be created, but not fully utilized.
htop

On the other hand, if you set the executor to new ForkJoinPool(1), all of the cores are busy.

ArrayProxyList.indexOf doesn't work correctly with 'sliced' proxies

When searching for the index and an element is found, the start index of the used ArrayProxy must be subtracted:

// In org.jenetics.internal.collection.ArrayProxyList class.
for (int i = proxy.start; i < proxy.end && index == -1; ++i) {
    if (element.equals(proxy.__get__(i))) {
        // Subtract the start index of the used proxy: 
        // index = i - proxy.start;
        index = i;
    }
}

Typo in user manual

Section 5.1
Search for: "The customer Genes and Chromosomes"
Replace "customer" by "custom"

Remove serialization from Phenotype

The Phenotype class is currently Serializable. Since the Phenotype contains a reference to the fitness function, the serialization of the Phenotype isn't really recommended.

Obscure exception

Hi,

I've likely misconfigured something, but even so there should be a more friendly/helpful exception explaining the problem.

Exception in thread "main" java.util.concurrent.CompletionException: java.lang.ArrayIndexOutOfBoundsException: 1
    at java.util.concurrent.CompletableFuture.internalComplete(CompletableFuture.java:205)
    at java.util.concurrent.CompletableFuture$AsyncApply.exec(CompletableFuture.java:507)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at org.jenetics.Crossover.recombine(Crossover.java:69)
    at org.jenetics.Recombinator.lambda$alter$42(Recombinator.java:110)
    at org.jenetics.Recombinator$$Lambda$58/2026408975.applyAsInt(Unknown Source)
    at java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:210)
    at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:250)
    at java.util.stream.IntPipeline$9$1.accept(IntPipeline.java:344)
    at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
    at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:693)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.IntPipeline.reduce(IntPipeline.java:456)
    at java.util.stream.IntPipeline.sum(IntPipeline.java:414)
    at org.jenetics.Recombinator.alter(Recombinator.java:111)
    at org.jenetics.CompositeAlterer.lambda$alter$8(CompositeAlterer.java:78)
    at org.jenetics.CompositeAlterer$$Lambda$55/792586270.applyAsInt(Unknown Source)
    at java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:210)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.IntPipeline.reduce(IntPipeline.java:456)
    at java.util.stream.IntPipeline.sum(IntPipeline.java:414)
    at org.jenetics.CompositeAlterer.alter(CompositeAlterer.java:79)
    at org.jenetics.engine.Engine.alter(Engine.java:399)
    at org.jenetics.engine.Engine.lambda$evolve$121(Engine.java:269)
    at org.jenetics.engine.Engine$$Lambda$35/1413653265.apply(Unknown Source)
    at org.jenetics.engine.TimedResult.lambda$of$114(TimedResult.java:81)
    at org.jenetics.engine.TimedResult$$Lambda$38/1418621776.apply(Unknown Source)
    at java.util.concurrent.CompletableFuture$AsyncApply.exec(CompletableFuture.java:501)
    ... 5 more

the line that throws is

    final Phenotype<G, C> pt2 = population.get(individuals[1]);

This is with version 3.1

Immutable Population

The current Engine implementation requires a mutable Population. The Population is also the only class of the model, which is still mutable. To simplify the implementation and to make the model more consistent, the Population should be immutable.

Improve Genotype validation

The validation of Genotypes should be more formalized. Currently, the Engine.Builder can be configured with an genotypeValidator and individualCreationRetries. This should mechanism should be improved. E.g. through an new Validator interface.

Simplify 'Seq' implementation

The current implementation of the Seq interfaces is not that clear and simple as it could be. Especially simplify the copy-on-write part of the implementations.

Simplified optimization classes

It should be possible to perform optimization tasks without be bothered with GA details:

  • Simplified Minimization and Maximization interfaces.
  • Make it parametrizable with sane default values.
  • Perform tests to find sane parameter values.

NOOB: Can't run examples

Hi, just git cloned and believe I followed the instructions correctly to use griddle to build jars- no errors were reported. I then cd to /Users/thealy/Downloads/jenetics/org.jenetics.example/src/main/scripts and ran ./run-examples.sh I get these errors:

readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
readlink: illegal option -- f
usage: readlink [-n] [file ...]
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Error: Could not find or load main class org.jenetics.example.Knapsack
Error: Could not find or load main class org.jenetics.example.OnesCounting
Error: Could not find or load main class org.jenetics.example.RealFunction
Error: Could not find or load main class org.jenetics.example.StringGenerator
Error: Could not find or load main class org.jenetics.example.TravelingSalesman

I tried a few guesses as to a command line argument, but none worked. Something stupid I know,
but can someone help me to get started here?

Thanks.

Remove testng.xml file

It should no longer be necessary to add new test classes to the testng.xml file. The test classes should instead determined automatically on every test execution.

Predifine commonly used problem encodings

It should be possible to use predefined encodings for common problems.

Introduce interface for defining problem encoding

public interface Codec<G extends Gene<?, G>, T> {
    public Factory<Genotype<G>> encoding();
    public Function<Genotype<G>, T> decoder();
}

Interfaces should not implement Serializable

According to Effective Java 2nd edition, classes meant for subclassing (including interfaces) should not implement Serializable. The book provides a long list of reasons which I will not repeat here (if you don't have access to the book, let me know and I'll figure something out)

Instead of declaring implements Serializable on classes like Gene, consider moving this down to the concrete classes that are not meant to be subclassed.

Repair procedure

Hi,

During the crossover/mutation operators, on our specific problema we might get invalid individuals. I know you are thinking about implementing a validity check at the genotype level for a future version.

However, what would be the best way to implement a repair procedure for the genotype?
During the evaluation procedure itself?

Kind regards,
Luis

Java 8 problem?

Hi,
I am a bit rusty with Java... but I really can't figure out something that might be very simple...
When I try to use on Eclipse your HelloWorldExample I keep getting a compilation error on this:
// 3.) Create the execution environment.
Engine<BitGene, Integer> engine = Engine
.builder(HelloWorld::eval, gtf)
.build();

I get:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The method builder(Function<? super Genotype,? extends C>, Factory<Genotype>) in the type Engine is not applicable for the arguments (HelloWorld::eval, Factory<Genotype>)
The type HelloWorld does not define eval(Genotype) that is applicable here

at HelloWorld.main(HelloWorld.java:22)

Any pointers???

Extend Gradle scripts for multi-module releases

It should be possible to build, package and upload more than one Jenetics module. This allows to keep the base module (org.jenetics) quite small and deploy non base classes (e.g. additional PRNGs) in separate modules (jars).

test failed: org.jenetics.util.NanoClockTest.millis

NanoClockTest.millis test failed with gradle wrapper "clean build jar" tasks.

Second build with "jar" task succeeded.

below is the error message:

java.lang.AssertionError: Got 1435772991847 but expected 1435772997614.
at org.jenetics.util.NanoClockTest.assertEquals(NanoClockTest.java:46)
at org.jenetics.util.NanoClockTest.millis(NanoClockTest.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Parallel EvolutionStream

The current EvolutionStream implementation evolves one generation after another, where the single evolution steps are parallelized where possible. E.g. the fitness evaluation of the population is done concurrently. An even better (multi-core) CPU utilization can be achieved by parallelizing the EvolutionStream itself.

final EvolutionResult<DoubleGene, Double> stream = engine.parallelStream()
    .collect(EvolutionResult.toEvolutionResult());

The main problem seems to be to find a strategy for merging two EvolutionResult objects.

Improve GA performance measurements

Improve the classes for evaluating the GA evaluation performance. This mainly means the improvement of the performance diagram creation, which should be easily usable for different (evaluation) parameters and GA problems.

Problem Transformation

Hi ,

I have a problem that think can use GA to solve it, but don't know how to transform the problem via Jenetics.

Suppose I have 5 Ads and want to display them on 5 different websites within 24 hours with a limited cost 300$. (assume 15$ per hour)

I already have a fitness function to predict number of user clicks and want to maximise it via GA.
The idea is try different strategy of the AD distribution to get the maximum user clicks

screen shot 2015-08-27 at 11 01 27 am

There are several constrains that I do not know how to use Jenetics to add.
1, for each website. the end time should bigger than start time
2, (the summed during time from 5 website * 15$ per hour) < 300$
3, All the 5 ads should be displayed on 5 website.

So it is actually a simple problem but have many constrains. Basically i want to set 15 genes (3 genes per website, include starttime ,endtime ,and number of AD ) there are some dependency between genes in one chromosome.

Appreciate if can explain how to use Jenetics to do it ?
Thanks

ISeq from 'subSeq' is mutable via the creating MSeq

The following test case shows the problem:

@Test
public void immutableSlice() {
    final MSeq<Integer> mseq = MSeq.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
    final MSeq<Integer> slice = mseq.subSeq(2);
    Assert.assertEquals(slice.get(0), mseq.get(2));

    final ISeq<Integer> islice = slice.toISeq();
    Assert.assertEquals(islice.get(0), mseq.get(2));

    mseq.set(2, 100);
    // This assertion fails, but shouldn't.  
    Assert.assertEquals(islice.get(0).intValue(), 3);
}

problem with IDE integration for eclipse

I tried to implement the IDE integration for eclipse:

cd build-dir
./gradlew eclipse

When I try to import the project into eclipse, I get multiple errors.
One of them is:

/org.jenetics/src/main/java/org/jenetics/PermutationChromosome.java

line 137:

    final ISeq<EnumGene<T>> genes = IntStream.range(0, alleles.length())
        .mapToObj(index -> new EnumGene<>(index, alleles))
        .collect(toMSeq())
        .shuffle(RandomRegistry.getRandom())
        .toISeq();

error:

Multiple markers at this line
- Type mismatch: cannot convert from ISeq<EnumGene<capture#9-of ?
extends T>> to ISeq<EnumGene>
- Line breakpoint:PermutationChromosome [line: 137] - of(ISeq<? extends
T>)

What am i missing?

thanks

Recombination with different Chromosome length

I don't understand what the user manual means when it says "Because of the possible different Chromosome length and/or Chromosome constraints within a Genotype, only Chromosomes with the same Genotype position are recombined."

Can you please provide a visual example demonstrating when recombination may or may not take place?

java.lang.NullPointerException

I tried to run the 0/1 Knapsack example coming from user manual, encountered below error.

Line of code that seem to be causing this error:
.collect(EvolutionResult.toBestPhenotype());
which is line 113 on user manual at 0/1 Knapsack example.

Error message:
Exception in thread "main" java.lang.NullPointerException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
at java.util.concurrent.ForkJoinTask.reportException(Unknown Source)
at java.util.concurrent.ForkJoinTask.join(Unknown Source)
at org.jenetics.internal.util.Concurrency$ForkJoinPoolConcurrency.close(Concurrency.java:119)
at org.jenetics.engine.Engine.evaluate(Engine.java:407)
at org.jenetics.engine.Engine.evolutionStart(Engine.java:441)
at org.jenetics.engine.Engine$$Lambda$24/1615780336.get(Unknown Source)
at org.jenetics.engine.EvolutionSpliterator.tryAdvance(EvolutionSpliterator.java:65)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at knapsack.Knapsack.main(Knapsack.java:41)
Caused by: java.lang.NullPointerException
at knapsack.Item.lambda$1(Item.java:28)
at knapsack.Item$$Lambda$40/905606853.accept(Unknown Source)
at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
at java.util.stream.IntPipeline$4$1.accept(Unknown Source)
at java.util.stream.IntPipeline$9$1.accept(Unknown Source)
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source)
at java.util.Spliterator$OfInt.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at knapsack.FF.apply(FF.java:23)
at knapsack.FF.apply(FF.java:1)
at org.jenetics.Phenotype.eval(Phenotype.java:137)
at org.jenetics.Phenotype.evaluate(Phenotype.java:130)
at org.jenetics.Phenotype.run(Phenotype.java:150)
at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:73)
at java.util.concurrent.RecursiveAction.exec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
at java.util.concurrent.ForkJoinTask.invokeAll(Unknown Source)
at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:77)
at java.util.concurrent.RecursiveAction.exec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
at java.util.concurrent.ForkJoinTask.invokeAll(Unknown Source)
at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:77)
at java.util.concurrent.RecursiveAction.exec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
at java.util.concurrent.ForkJoinTask.invokeAll(Unknown Source)
at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:77)
at java.util.concurrent.RecursiveAction.exec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
at java.util.concurrent.ForkJoinTask.invokeAll(Unknown Source)
at org.jenetics.internal.util.RunnablesAction.compute(RunnablesAction.java:77)
at java.util.concurrent.RecursiveAction.exec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Implementation of TreeGene/Chromosome

The current Gene/Chromosome implementations only allows to model one-dimensional structures. When the Genotype contains more than one Chromosome, two-dimensional structures are possible.

This issue is about to implement Gene/Chromosomes, which allows to model tree-structures.

AbstractChromosome.isValid() is not thread-safe

The Javadoc says that Chromosome implementation must be immutable. AbstractChromosome is immutable but not thread-safe, because _valid may be set by multiple threads in parallel. Is this safe?

Add 'Seq.append' and 'Seq.prepend' methods

This should make it easier to create new sequences with different length.

public Seq<T> append(final T... values);
public Seq<T> append(final Iterable<? extends T> values);
public Seq<T> prepend(final T... values);
public Seq<T> prepend(final Iterable<? extends T> values);

How to model problems with a deep hierarchy?

I couldn't find a mailing list for jenetics, nor am I sure that is the best place to ask such questions (versus say Stackoverflow).

I'm trying to figure out how to model a scenario where there are more levels of hierarchy in the problem set than the hierarchy provided by jenerics. Example:

  • I've got a population of individuals.
  • Each individual lives 30-100 years (the length is only known at runtime, and differs between individuals).
  • Each year, the individual carries out 0 to X different operations (example: buy or sell stocks).
  • Each operation may buy or sell multiple stocks at once.
  • There are different types of stocks.

So we've got multiple individuals, each individual has multiple years, each year has multiple operations, each operation operates on one or more stocks.

It's not clear how to model this information in the context of a population, phenotype, genotype, chromosome and gene.

Second problem:

Mutation and crossover are highly likely to fail to produce a valid individual. This is because modifying an individual's state at any given year depends heavily on the operations that occurred in previous and subsequent years. An individual can only sell 100 units of stock X if he purchased those units in previous years. Similarly, selling all shares of stock X at year 10 might invalidate year 11's state because it originally sold shares of stock X (which the individual no longer owns).

I still want mutation and crossover to take place, but I'm concerned about the fact that 99% of attempts will fail which will substantially increase the cost of a successful operation.

Any ideas?

Genotype validity

Hi,

I am working the so called Cut Order Planning problem for the textile industry.
I have been doing a couple of trials and I started out by working with the generic IntegerChromosome and Genotype. However, the fact is that, in order to reduce the search space (by removing lots of invalid genotypes) I think I would have to extend Genotype: the overall genotype's validity depend on the multiplication result of each chromosome gene by a factor contained on another chromosome (the bounds of each of genes on each of these chromosomes are also different).
The situation is that Genotype is final. Do you see any other solution for this?

Kind regards,
Luis

Make 1..n `Codec` instances composeable

One ore more existing Codec instances should be composeable to one, which can be used for building an evolution Engine. This would help to create the Codec for more complicated problem by composing it from simpler one.

A possible usage can look like the following:

Codec<DoubleGene, Double> codec = Codec.of(
    codec.ofScalar(DoubleRange.of(0, 10)), // Codec for partial problem 1.
    codec.ofVector(DoubleRange.of(1, 2), DoubleRange.of(45, 100)), // Codec for partial problem 2.
    codec.ofVector(DoubleRange.of(0, 1), 10)  // Codec for partial problem 3.
);

The composite Codec will create the needed Genotype<DoubleGene> by concatenating the DoubleChromosome from the partial Codec instances.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.