在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):xviniette/FlappyLearning开源软件地址(OpenSource Url):https://github.com/xviniette/FlappyLearning开源编程语言(OpenSource Language):JavaScript 97.0%开源软件介绍(OpenSource Introduction):Demo)Flappy Learning (Program that learns to play Flappy Bird by machine learning (Neuroevolution) NeuroEvolution.js : Utilization// Initialize
var ne = new Neuroevolution({options});
//Default options values
var options = {
network:[1, [1], 1], // Perceptron structure
population:50, // Population by generation
elitism:0.2, // Best networks kepts unchanged for the next generation (rate)
randomBehaviour:0.2, // New random networks for the next generation (rate)
mutationRate:0.1, // Mutation rate on the weights of synapses
mutationRange:0.5, // Interval of the mutation changes on the synapse weight
historic:0, // Latest generations saved
lowHistoric:false, // Only save score (not the network)
scoreSort:-1, // Sort order (-1 = desc, 1 = asc)
nbChild:1 // number of child by breeding
}
//Update options at any time
ne.set({options});
// Generate first or next generation
var generation = ne.nextGeneration();
//When an network is over -> save this score
ne.networkScore(generation[x], <score = 0>); You can see the NeuroEvolution integration in Flappy Bird in Game.js. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论