Git Product home page Git Product logo

simulatedannealingexample's Introduction

SimulatedAnnealingExample

An example Simulated Annealing. Requires a set of libraries, including Apache POI, described in the pom.xml for Maven users. Non maven users should check out the same file for the JARs to download.

Simply put, the following String is the "problem" to be solved:

1-7-3-4-6-7-3-2-1-4-7-6-Charlie-3-2-7-8-9-7-7-7-6-4-3-Tango-7-3-2-Victor-7-3-1-1-7-8-8-8-7-3-2-4-7-6-7-8-9-7-6-4-3-7-6

SA will generate a String of the same length (assumed Hard Constraint), and will repeatedly replace characters until the end time condition/s are met.

In this example there is a single simple Soft Constraint (SC) which considers fitness as similarity to the solution in terms of number of characters correct thus far. A better example might be to generate random Strings of random lengths, and have a soft constraint to consider length. This could also be further advanced with unicode consideration. And of course, less "insider knowledge" for the SC.

This also contains some output using the Apache POI library, fairly useful for examining results from the SA. For more optimised statistical analysis the Output.java file should be modified for outputting CSV files, for use in R etc.

For anyone who gets the "problem" reference:

simulatedannealingexample's People

Watchers

 avatar

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.