Giter VIP home page Giter VIP logo

csmazes's People

Contributors

jamis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csmazes's Issues

large, easily-remedied inefficiency in "hunt and kill" algorithm

I noticed while running the maze examples that the "hunt and kill" algorithm, during the "huntStep" (state 2), checks ever column of every row, starting with (0,0), for a cell that responds to isBlank. This check can go on for many rows. Once it finds a cell, it performs a "walkStep" (state 1) and begins the search process all over again, starting at row 0. This is very inefficient and easily fixed.

I propose that after each row where no cell responded to isBlank, increment a "processed rows" counter and start from that row on the next searching step. Of course, this is a very simple approach to fix this inefficiency. A more complex approach would also increment/reset column numbers within the row, and an even more complex approach could just increment a "processed cells" number every time one is seen or started and then take the modulo of that number and the number of columns to retrieve an exact starting position.

Eller's Maze Description In Your Book

Hi. I'm not sure if this is the appropriate place to post this but I think there is a mistake in your Eller's maze description on pages 190 to 192 in your book "Mazes For Programmers."

On page 191 after carving south into the second row of the maze, you don't do anything to prevent loops from forming in the maze. Your illustration doesn't include any loops but in the last diagram on page 191 take a look at cells 6 and 1. There is no reason those two cells could not be joined together (they are adjacent and differen't sets) assuming your random integer is a 0. This would cause all four of the upper right corners of the maze to be connected in a loop.

EDIT: Ooops I made a mistake. Joining those cells like I suggested would NOT create a loop;

Add topics to this Github repository

This will make for easier searching and it will mean it can be more easily grouped with other similar projects.

I recommend adding the "maze" topic, but other topics such as "CofeeScript" and "generator" may be suitable too.

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.