Giter Site home page Giter Site logo

ict2104car's Introduction

ICT2104 Mapping

Current Capabilities

The system reads a .txt file consisting of the possible paths that it can take. The possible paths are stored with 3 bits.
First bit 1 - Moving left is possible
Second bit 1 - Moving forward is possible
Third bit 1 - Moving right is possible.
If there are multiple possible paths, the car will prioritise going front first, followed by right then left.


Once the program runs, for each step taken, there will be 2 different kinds of output. Firstly, the direction moved would be printed as “Move Forward”, “Turn Right”, and “Turn Left”. Secondly, at each coordinate, there would be information about the coordinate and the car printed.


Each coordinate stores the following information:
X and Y values.
pathAvail: A 3-bit value which reads the .txt file and determines the possible paths relative to where the car is facing.
pathUnexplored: Similar to pathAvail, but once the possible path is taken, the bit is removed.
nextOrientation: A 2-bit value storing the orientation of the car after its next move, relative to where the car was previously.
selfOrientation: A 2-bit value storing the car’s current orientation.
isLast: A 1-bit value which indicates whether the coordinate is the last visited one.


Examples of Output:
image


The car is also able to detect loops and a dead end/explored point. If the car reaches a dead end/explored point, it will turn around by turning right twice. If the car reaches a loop, it will ##TBD


Map

ict2104car's People

Contributors

tryhardlaijun avatar naointing avatar

Watchers

 avatar

Forkers

naointing

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.