Skip to content

🌿🤖 artificial intelligence algorithm to solve sudoku, seaweed inspired

Notifications You must be signed in to change notification settings

davigl/sudoku-ia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Resolver

Ruby Genetic Algorithm Bio-Inspired in Seaweeds 🌿

Inline docs

Star on GitHub Watch on GitHub

Rate 89.40

Ruby Critic Score: 89.40

Problem

Seaweeds are arranged at an (Ocean) search space and they must solve an even N-size sudoku.

About the Algorithm

Search and optimization algorithm with bio-inspiration in seaweed (genetic algorithm). This algorithm follow these steps to get a solution.

1 Create Candidates (Seaweeds);
2 Seaweeds are evaluated by oxygen production;
3 Allows adaptation based on the best (fragmentation, binary division);
4 Select the ones to replace;
5 Create new generation / group and return to step 2 until the stop condition is reached.

Running the Script

Set sudoku size by editing ocean.rb and oxygen.rb, then run.

ruby ocean.rb

About the Seaweeds

    *  *          /*._   
 *  *'*  *'*   .-*'`   `*-.._.-'/"
*'* *'*   **  < * ))     ,     ( "
*'*  *'* **    `*-._`._(__.--*`."
 *'*  *' *   
  *'* *'**   o        /\
  *'* *'**    o     _/./
   *'*'**   O    ,-'    `-:..-'/
     **         : o )      _  (
     	        "`-....,--; `-.\

Seaweed is the common name for a diverse polyphyletic grouping of photosynthetic organisms whose life cycle is generally complete in the aquatic environment.

About 90 percent of the oxygen in the earth's atmosphere is estimated to be generated by planktonic algae photosynthesis.

Algae, both unicellular and multicellular, have asexual and sexual reproduction. In unicellular algae asexual reproduction occurs by binary division, with one individual giving rise to two others. In the case of multicellular algae, this type of reproduction can occur by stem fragmentation, as is common with filamentous algae, or by zoospore. In this process, an individual forms flagellate cells called zoospores that detach and, when fixed on some substrate, give rise to new individuals.

Many species of algae are unicellular beings, living free in the water and moving with the aid of flagella or amoeboid movement. Some species have no movement of their own and occur in the environment either in coccoid form (coccus, the simplest type of bacteria) or in mucoid-covered capsoid form. However, even unicellular algae can sometimes be grouped into colonial forms, mobile or not.

License

Copyright © 2019, Davi Guimarães.

Releases

No releases published

Packages

No packages published

Languages