Giter Site home page Giter Site logo

aasma's Introduction

AASMA

Default car velocity: FIX ME Default pawn velocity: FIX ME (probably 1 or 0,5)

Initial state: PedestrianPositions: random on pedestrian zones CarPositions: random on free zones PedestrianDirections: random according to right direction of the road CarDirections: random Number of car = number of parking spots = 20 Number of pedestrians = 40 (for example)

Final state: Number od moving car = 0 and number of pedestrians = 0

Variables: NumberOfCars NumberOfMovingCars NumberOfPedestrians

NumberOfGoodCars NumberOfBadCars

Goal of car: find a parking spot and stop Goal od pedestrian: find some goal positions (?)

Sensor: -see all positions untill a wall is met or the end of the map; -check x number of positions ahead -to check if there are people near the zebra, must check "diagonal positions" ie +1 in the car's orientation and +1/-1 on the other orientation

Define critical zones such as: zebras, crossings (use right hand rule), roundabouts, walls

Handling critical zones:

Roundabouts: define max velocity, eg, in each cycle it will only run 2 or 1 positions
             slow down before arriving to the roundabout (1 position). At the entrance check for cars in the position (+1, -1), 
             if a car exists, stop for 2 cycles, recheck again in the next 2 cycles.
             elif check if car ahead (+1), wait for 1 cycle if there is and recheck in the next cycle
             else move
             
             inside it, move freely
             
Walls:
            always turn left when finding an obstacle in the position ahead.
            
Crossings:
            all cars slow down.
            if car wants to turn right, check position ahead, if car wait for 1 cycle and recheck
            else move
            
            if car wants to go forward, check if there's car in the position before the entrance on the right (+2, +1)
                 or a car ahead of him (+1,+0) THERES A HUGE DEMON HERE: IF 4 CARS APPEAR AT THE SAME TIME IN DIFFERENT
                                                ENTRANCES!!!!!
                 
                 
            if car wants to turn left-> check position ahead, if car wait for 1 cycle and recheck or if there's car                                                         in the position before the entrance on the right (+2, +1), wait 1 cycle and recheck, or there's a car in the position (+3, -1) wait 1 cycle at the entrance
              HANDLE CHECKLIGHTS AFTER ALL THIS IS DONE (some more ifs getters nothing hard)

Parking: if parking_spot ahead and free, then move forward and stop! if parking_spot aheas and !free, then turn left (same as for walls)

Planning:

Disjktra:

GoodCars and BadCars:

More events?

aasma's People

Contributors

diogopblopes avatar franciscoprelhaz avatar joaquimesteves avatar

Watchers

 avatar  avatar  avatar

Forkers

diogopblopes

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.