{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

proj1 - Overview CMSC 330 Organization of Programming...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMSC 330: Organization of Programming Languages Project 1 – Maze Solver CMSC 330 2 Overview Write Ruby program to process maze files Parse & store simple maze file Analyze & process maze Parse standard maze file • Goals Learn Ruby data structures Learn basic text processing CMSC 330 3 Maze 2D square maze with walls separating cells Start & end located anywhere in maze Examples +-+-+-+-+ |e| | | + + + +-+ | | +-+ + + + | | | + +-+ +-+ | |s | +-+-+-+-+ +-+-+-+-+ |e| | | + + +-+-+ | | | +-+ + + + | | | + +-+ +-+ | |s | +-+-+-+-+ Unsolvable Solvable CMSC 330 4 Parts of Project Read in maze from simple maze file, then 1. Find maze properties 2. Rank paths by cost 3. Pretty-print maze 4. Decide whether maze is solvable Parse standard maze file 1. Find & report invalid lines, if any 2. Else translate into simple maze file CMSC 330 5 Maze Specification • Maze An n n array of cells With specified starting & end cell May include paths • Cells May have openings in walls Specified as udlr up, down, left, right Each opening has a weight • Paths
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}