Not Cool

经典寻路算法可视化演示集合

A collection of classic pathfinding algorithms, visualized.

Built for TIC-80 fantasy console · 8× Lua

🔴 现场演示 / Live Demo

Pathfinding demo animation

🧠 算法一览 / Algorithms

A* Search

启发式搜索,最佳优先与代价结合

启发式
O(bᵈ)
🌊

BFS

逐层扩展,保证最短路径

盲目搜索
O(V+E)
↔️

Bidirectional BFS

从起点和终点同时搜索

双向
O(bᵈ/²)
🔽

DFS

深度优先,一路到底

盲目搜索
O(V+E)
📏

Dijkstra

加权最短路径,统一代价搜索

盲目搜索
O((V+E) log V)
🎯

Greedy BFS

纯启发式驱动,贪心选择

启发式
O(bᵐ)
🔄

IDA*

迭代加深 + A* 启发式

迭代 启发式
O(bᵈ)
⬇️

IDDFS

逐步增加深度限制的DFS

迭代 盲目搜索
O(bᵈ)

🚀 使用方法 / Usage

  1. 运行 TIC-80 幻想主机
    Launch the TIC-80 fantasy console
  2. 将对应算法的 .lua 文件放到你的工作目录
    Place the algorithm .lua file in your working directory
  3. 在代码编辑器第一行添加 dofile('xxx.lua')
    Add dofile('xxx.lua') as the first line in the code editor
  4. sprites.gif 导入精灵图
    Import sprites from sprites.gif
  5. 导入 world.map 地图(或自己画一个)
    Import map from world.map, or draw your own
  6. 运行卡带 🎮
    Run the cartridge

⌨️ 按键映射 / Key Map

操作 按键
Control "C" Z
Control "L" X
上 / Up
下 / Down
左 / Left
右 / Right