Code Monkey home page Code Monkey logo

mazefiles's People

Contributors

cua-cua avatar derekchall avatar menyiques avatar micromouseonline avatar peque avatar stuartlivings 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

Watchers

 avatar  avatar  avatar  avatar

mazefiles's Issues

Proposed file format change

After using the files for a while, I think the usefulness could be improved with a modification to the format:

Goal Area: For both the classic and half size mazes, the goal is not a single cell but a rectangular region. Neither contest specifies that there should be only a single entrance to that area and so it makes sense to mark ALL the goal area cells with the letter 'G'.

Meta Data - Size: Users of the text mazes must examine the entire data file before they know the dimensions of the maze. An assumption can be made that the maze is square and one of two pre-determined sizes but that is not a given. Some contests do not use a full 16x16 or full 32x32 maze. Practice mazes may be any size. While it is possible to fit any contest maze inside a 32x32 footprint, it is possible to always make this work. However, it would be more useful if the maze dimensions were recorded in the file. If they are at the start of the file, the parser has useful information to help it on its way and could also dynamically allocate only as much memory as would be needed for the actual maze represented in the file.

Meta Data - comment: sometimes a maze needs a descriptive comment. This may be just the name in a less cryptic format than the filename. Also, there is nothing in the filename that tells the user that this is from a classic or half-size contest/event. Nor can that information be inferred from the maze size since 16x16 half size mazes may be used for qualifying rounds or smaller events. A free text comment field at the start of the maze will aid the user in identifying its use and purpose.

Proposed Change
A single comma delimited line should be added as the first line in the file. This line would contain the meta data described above in the format
width,height,description
*width and height are both integer values normally in the range 2-32
*description is a non quoted ascii text string. This would normally be less than 120 characters in length so that the line is not longer than the printed width of a maze. A description should not include a comma as this will be interpreted as a delimiter

A possible maze file might then contain:

8,7,Small Home Test Maze
o---o---o---o---o---o---o---o---o
|                               |
o   o   o---o---o---o---o---o   o
|   |                           |
o   o---o---o---o---o---o---o   o
|   |         G   G   G |       |
o   o   o---o   o   o   o   o---o
|   |   |   | G   G   G |       |
o   o   o   o---o---o---o---o   o
|   |   |                   |   |
o   o   o---o   o---o---o   o   o
|   |                   |   |   |
o   o   o---o---o---o   o   o   o
| S |   |               |       |
o---o---o---o---o---o---o---o---o

Existing code could adapt to the change by simply examining the first character of the file to see if it is a digit since the zero character is not a good choice for a post. If no digit is found, parsing can continue as before. Otherwise, the line could be skipped and parsing continue on the second line. Or, of course, the metadata could be used to guide a more extensively modified parser.

If you have suggestion for, or objections to, this change please let me know as soon as possible.

@kangzhangqi do you use these files?

Simplify classic file names

Do you think it would make sense to remove all -classic-16x16 from the classic/ maze files? It is kind of redundant information and would make names a bit shorter.

Also, would not it be better to remove the "counter" in some files (i.e.: the recently added NTF files)? It does not seem to be meaningful and there is already the year number which would maintain the same sorting.

I can do it if you want me to, but I thought I would ask first, just in case you did not want to change it... 😊

Maze files hierarchy

First of all, thanks for creating this repository, I am already using your maze files in my, for now very basic, maze search algorithm simulator (source code is available, but I am still documenting it...):

https://www.youtube.com/watch?v=6Om6xij6LAw

I just wanted to share my thoughts on this repository hierarchy. I think it would make sense to have a folder to store all the maze files (so that they are separated from the README file and, perhaps, the LICENSE file if you add one). This way you could add continuous integration files too (i.e.: Travis, test scripts), without mixing them with the actual maze files. I could help with CI if you want to add that to this repo.

Example:

/
    16x16/
        japan2017.txt
        ...
    32x32/
        japan2017.txt
    README.rst
    LICENSE
    .travis.yml

As you see, I think this repository could contain not only classic maze files but maybe also half-size maze files too. The definitive, universal micromouse maze files collection everybody uses and contributes to. 😂

Feel free to ignore this and close this issue if you do not agree. If that is the case I will not bother you again with this! 😊

How to mark goal cells in maze files

We already discussed this in #7, but I still wanted to discuss this a bit more (in a different issue to avoid polluting the other thread).

For what I see, starting cell and goal cells are a way of indicating what was known by the mouse before the exploration phase. That information may change depending on the competition.

This means:

  • I do agree that all 4 cells in classic mazes should be marked with a "G", as that is the information you have, but no more (i.e.: you do not know about the walls around that area).
  • It seems under the current Japan rules the goal area is fully specified. In this case I do agree all cells should be marked with a "G" too. But I am assuming no information is given about the walls around the goal area.
  • It seems under old Japan rules the goal area was not specified, but only the entrance (is not that correct?). That is the case I was talking about when I said we should only mark a single cell for "old" half-size mazes. If that is the only information you had before exploration, then I think we should not add any extra "clues".
  • You mentioned that under Taiwanesse rules both the area and the entrance is specified/provided. If that is the case, then I think not only we should mark all the area with "G"s, but maybe also we should add an indicator of "known cell", because you do know the walls around the goal area.

Known cells could be indicated with an * (or any other character) at the right of the cell tag. Starting cells would all have that indication, as the starting cell is always known (you not only know the position, but also the walls around it):

Example of a Taiwanese maze:

o---o---o---o---o---o---o---o---o
|                               |
o   o   o---o---o---o---o---o   o
|   |                           |
o   o---o---o---o---o---o---o   o
|   |         G*  G*  G*|       |
o   o   o---o   o   o   o   o---o
|   |   |   | G*  G*  G*|       |
o   o   o   o---o---o---o---o   o
|   |   |                   |   |
o   o   o---o   o---o---o   o   o
|   |                   |   |   |
o   o   o---o---o---o   o   o   o
| S*|   |               |       |
o---o---o---o---o---o---o---o---o

Old Japanese:

o---o---o---o---o---o---o---o---o
|                               |
o   o   o---o---o---o---o---o   o
|   |                           |
o   o---o---o---o---o---o---o   o
|   |         G         |       |
o   o   o---o   o   o   o   o---o
|   |   |   |           |       |
o   o   o   o---o---o---o---o   o
|   |   |                   |   |
o   o   o---o   o---o---o   o   o
|   |                   |   |   |
o   o   o---o---o---o   o   o   o
| S*|   |               |       |
o---o---o---o---o---o---o---o---o

New Japanese:

o---o---o---o---o---o---o---o---o
|                               |
o   o   o---o---o---o---o---o   o
|   |                           |
o   o---o---o---o---o---o---o   o
|   |         G   G   G |       |
o   o   o---o   o   o   o   o---o
|   |   |   | G   G   G |       |
o   o   o   o---o---o---o---o   o
|   |   |                   |   |
o   o   o---o   o---o---o   o   o
|   |                   |   |   |
o   o   o---o---o---o   o   o   o
| S*|   |               |       |
o---o---o---o---o---o---o---o---o

Pinging @tokoro10g in case they want to share their opinions. Also in case we (or rather I) misinterpreted the Japanese rules (I used Google Translate, so it is very likely my interpretation is wrong).

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.