chuyangliu / snake

Artificial intelligence for the Snake game.
Apache License 2.0
1.65k stars 481 forks source link

Bug #30

Closed pitaohc closed 5 years ago

pitaohc commented 5 years ago

I change the size of the map to 100*100. And obviously, it moves so slow and when its length its route isn't the best one. There are a screen picture and a vedio. I thought if the snake's lenght is less than the lenght of the food it reaches ,it can go left or right and then go up or down . I wish the message can help you image 序列 01.zip

chuyangliu commented 5 years ago

Which solver are you referring to?

pitaohc commented 5 years ago

The solution is HamiltonSolver and the mode is normal.I found you project in a website called HelloGitHub. Although I know little about Python(I am learning CPP), I'm interested in you project. So I clone ,run and observe it . At the begin, the map is 88 . The consequence looks like normal. Then I change the map's size to 100100. As the vedio ,the snake route is wrong. However, I can't sure what 's wrong due to my weakness about Pychon. So I haven't the ability to fix the code . What I only can do are writing the issue to you and giving you my opinion about it. I'm so sorry . 😟😟😟 Oh ,are you Chinese? If you are, why don't we speak Chinese in futural e-mail.😂😂😂

------------------ 原始邮件 ------------------ 发件人: "Chuyang Liu"notifications@github.com; 发送时间: 2019年4月30日(星期二) 中午12:18 收件人: "chuyangliu/snake"snake@noreply.github.com; 抄送: "电光隼⚡"pitaohc@qq.com; "Author"author@noreply.github.com; 主题: Re: [chuyangliu/snake] Bug (#30)

Which solver are you referring to?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

chuyangliu commented 5 years ago

This isn't a bug. Hamilton Solver does not guarantee the shortest path. Instead it builds a "safer" path that direct the snake to eat more food than other solvers. You can see from the doc that the snake will follow a Hamiltonian cycle to eat the food, which is consistent with the path in your video.

I'm trying to use English as much as possible so that more people can understand the conversation. Sorry about that.