This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## ------------------------------------------------------------------------ | |
| # Set the repo for use throughout | |
| cran <- "https://cran.rstudio.org" | |
| # Install | |
| if(!require(miniCRAN)){ | |
| install.packages("miniCRAN", repos = cran) | |
| } | |
| ## ------------------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- A simple genetic algorithm for function optimization, in lua | |
| -- Copyright (c) 2009 Jason Brownlee | |
| -- | |
| -- It uses a binary string representation, tournament selection, | |
| -- one-point crossover, and point mutations. The test problem is | |
| -- called one max (a string of all ones) | |
| -- | |
| -- configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- MarI/O by SethBling | |
| -- Feel free to use this code, but please do not redistribute it. | |
| -- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM. | |
| -- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level, | |
| -- and put a copy in both the Lua folder and the root directory of BizHawk. | |
| if gameinfo.getromname() == "Super Mario World (USA)" then | |
| Filename = "DP1.state" | |
| ButtonNames = { | |
| "A", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Genetic Algorithmn Implementation | |
| see: | |
| http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php | |
| """ | |
| import random | |
| class GeneticAlgorithm(object): | |
| def __init__(self, genetics): | |
| self.genetics = genetics | |
| pass |
NewerOlder