GithubHelp home page GithubHelp logo

assignment1ai's People

Contributors

jakobfeng avatar mariueng avatar

assignment1ai's Issues

Make class Node with attributes and methods

  • Make class
  • Attributes: xValue, yValue, groundType (groundType can be FS, MB or MO), NEIGHBORS (ArrayList on fixed size 4. Where index 0 = up neighbor, 1 = right, 2 = down, 3 = left)
  • Method: constructor
  • Method: setGroundType. Setter for gound type.
  • Method: addNeighbors. Input: Node n and int i. Retun void.

Make paths for all moving boxes in list

  • Make new administrative class "PathForAllMovingBoxes"
  • Field: an arraylist<arraylist>, that is a list of paths for all moving boxes
  • method: makePathForAllMovingBoxes();

Make class Grid with methods and attributes

  • Attributes: distance (between nodes), k (number of last nodes you will have to check in VERTICES for neighborhood), VERTICES (ArrayList collection of all nodes).
  • Method: Constructor
  • Method: sampleVertices (Called in the constructor). Utilizes class Node to generate nodes and edges. This will eventually represent the C-space.
  • Methods: changeGroundType{x1, y1, x2, y2} (where x1,y1 reprsent area where a box was before, and x2,y2 represent area where box is now located) and loop through all elements in VERTICES to see if they need to change their groundType.

Discretize path for robot

Input: ArrayList
Output: ArrayList

Will be used only for discretizing the path from a robot start position to the position of the next box to move. Does not take rotation into account.

Make path for robot from start node to movingBox

  • Class: PathForRobot
  • Do not take rotation into account yet
  • Need to make a node at the line segment of the box you want to move, oppsite of where the box will start to move in it's path
  • Input: Node startNode, Box movingBox
  • output: ArrayList

Improve A* search

  • Improve the algorithm in method findPath(Node startNode, Node goalNode) so that it takes the f = k + h works according to litterature

Move robot and box

  • Box shall move in the discretized path
  • Robot shall always move grid.getLength()/2 (or simply w/2) units behind the box
  • The robot need a procedure each time the path changes direction: go w/2 units back, rotate 90 degress, move w/2 unit to one of the sides (chech next direction!) and move w the orthogonal direction, and then start to push box forward again.

Pathfinder

-[ ] Make class PathFinder which implements A* search based on euclidean distance from init node to goal node

Make helping nodes for the box you want to move

  • Make node for box center point. Connect it with helping node.
  • Make helping node for the center node, such that ell edges are orthogonal. Connect this edge to the grid
  • Make node for the end position where the box center point is suppose to end up. Connect it to grid.

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.