1 Star 0 Fork 3

C4PO/SuperMarioBros-AI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
settings.config 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
[NeuralNetwork]
input_dims = (4, 7, 10) # (start_row, width, height) where width and height are in number of tiles
hidden_layer_architecture = (9)
hidden_node_activation = relu
output_node_activation = sigmoid
encode_row = True
[Graphics]
tile_size = (16, 16) # Tile size in pixels in the (X, Y) direction
neuron_radius = 8
[Statistics]
save_best_individual_from_generation = /path/to/save/individuals
save_population_stats = /path/to/save/stats.csv
### Genetic Algorithm ###
[GeneticAlgorithm]
fitness_func = lambda frames, distance, game_score, did_win: \
# frames: Number of frames that Mario has been alive for
# distance: Total horizontal distance gone through the level
# game_score: Actual score Mario has received in the level through power-ups, coins, etc.
# did_win: True/False if Mario beat the level
max(distance ** 1.8 - \
frames ** 1.5 + \
min(max(distance-50, 0), 1) * 2500 + \
did_win * 1e6, 0.00001)
[Mutation]
mutation_rate = 0.05 # Value must be between [0.00, 1.00)
mutation_rate_type = static
gaussian_mutation_scale = 0.2 # The amount to multiple by the guassian(0, 1) value by
[Crossover]
probability_sbx = 1.0
sbx_eta = 100
crossover_selection = roulette
tournament_size = 5
[Selection]
#num_parents = 200
#num_offspring = 1000
num_parents = 10
num_offspring = 90
selection_type = comma
lifespan = inf
[Misc]
level = 1-1
allow_additional_time_for_flagpole = True
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/c4po/SuperMarioBros-AI.git
git@gitee.com:c4po/SuperMarioBros-AI.git
c4po
SuperMarioBros-AI
SuperMarioBros-AI
master

搜索帮助