GithubHelp home page GithubHelp logo

tansm / automouser Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 140 KB

一个简易的老鼠走迷宫的程序,是为教大儿子学习算法而编写的,可惜他对编程无感,算了。

License: MIT License

C# 100.00%

automouser's Introduction

AutoMouser

一个简易的老鼠走迷宫的程序,是为教大儿子学习算法而编写的,可惜他对编程无感,算了。

此程序是使用了最简单的深度优先算法,因为考虑儿子刚开始学,所以简单些。界面的实现比较的糟糕,抖动的厉害,没时间管他。

你可以用鼠标拖动的方式绘制墙和道路,保留一个入口和出口即可工作,你也可以保存或读取地图,但简单起见就固定的文件了,你需要多个地图就自己改吧。

还是简单介绍算法吧,主要程序在Map类,提供地图的描述,老鼠寻路的算法即路径也在Map中(更好的实现应该独立出路径类),算法一开始先找到出口和入口,然后尝试从左上右下四个方向寻找是否有道路,如果是道路且之前没有走过,就压栈,继续,如果四个方向都没有的走了,就退回一步(出栈,注意:当前算法有点问题的,要出栈两次),继续,直到找到出口。

automouser's People

Contributors

tansm avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

zymitsky

automouser's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.