登录
首页 » 算法 » 有脑子的贪吃蛇

有脑子的贪吃蛇

于 2022-06-01 发布 文件大小:4.65 kB
0 139
下载积分: 2 下载次数: 1

代码说明:

一个贪吃蛇AI的js实现,基本思想:先模拟一条蛇使用去吃食,若吃到食物后(广度优先寻最短路径)蛇处于安全状态,则让真蛇去吃;若不安全,则跟着蛇尾走(广度优先寻最长路径),没走一步都需进行一次上述判断。注:只要能找到蛇头到蛇尾的路径,则蛇安全。 上述算法仍可能导致蛇进入死循环,则没有安全路径可以吃到食物,该情况发生在大部分食物已经吃完的时候,目前没找到解决办法,若有兴趣或有更好的解法,欢迎联系。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • DCT快速的C语言实现的64,
    DCT快速算法64位的C语言实现,乘法次数目前最少,可嵌入解码器使用-DCT the fast algorithm 64 C language realization, the multiplication number of times at present are least, may insert the decoding use
    2022-12-21 14:10:03下载
    积分:1
  • This is a program that generate a universe of chromas females and males, crosses...
    This a program that generate a universe of chromas females and males, crosses men with women and makes the best chromosome of generation-This is a program that generate a universe of chromas females and males, crosses men with women and makes the best chromosome of generation
    2022-11-11 12:50:03下载
    积分:1
  • ReadWriteBlob
    这是codeproject站点的一个示例,用于在blobsqlserver连接中发送和接收数据。
    2023-07-18 01:15:03下载
    积分:1
  • C#计
    using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Runtime.InteropServices; using System.IO; namespace 计算器 { /// /// Form1 的摘要说明。 /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button5; private System.Windows.Forms.Button button6; private System.Windows.Forms.Button button7; private System.Windows.Forms.Button button8; private System.Windows.Forms.Button button9; private System.Windows.Forms.Button button11; private System.Windows.For
    2023-01-30 17:15:03下载
    积分:1
  • 用双点弦截f(x)=0
    用双点弦截法计算f(x)=0-Two-point cut-off method string f (x) = 0
    2022-03-26 14:23:10下载
    积分:1
  • a new numerical algorithm
    一种新型的数值求解算法-a new numerical algorithm
    2022-12-01 11:45:03下载
    积分:1
  • Dolfin provide a high
    Dolfin provide a high-performance linear algebra library
    2023-08-08 21:45:05下载
    积分:1
  • 51单片机源代码
    很详细 请认准阅读FPGA控制LCD1602调试笔记 有原理介绍和源代码 此资料来自百度文库(http://wenku.baidu.com/) 您目前所看到的文档是使用的抱米花百度文库下载器所生成
    2022-02-05 20:50:35下载
    积分:1
  • DTMKL源码及实例
    该算法在某个再生核希尔伯特空间,在充分考虑领域间分布的均值差和散度差最小化的基础上,基于结构风险最小化模型,提出一种领域适应核支持向量学习机(Kernel support vector machine for domain adaptation, DAKSVM)及其最小平方范式,通过寻求某个特征变换,使得在确保训练数据的最大分割的同时,实现领域间不同分布之间的距离充分最小化,从而实现领域适应学习。
    2023-03-13 12:40:03下载
    积分:1
  • Kalman filter in detail
    卡尔曼滤波器详细介绍,-Kalman filter in detail
    2022-01-25 22:26:31下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载