Git Product home page Git Product logo

multi-agent-surveillance's Introduction

About Me

I have a bachelors degree in Artificial Intelligence and Data Science and am a full stack software and machine learning engineer with a keen interest in image geolocation, having published my thesis Proportional Search Space Reduction: A Novel Metric for Cross-View Image Geolocation at the BeNeLux AI Conference (BNAIC). Making state of the art models is cool ... but making them accessable is way cooler. Check out my sudoku solver AI and free to use API as an example of models I have made out in the wild.

Technologies

Machine Learning and Data Science

Back-end

Front-end

Dev Ops

Embedded Systems

Tutoring

If you got here from SuperProf check out my Tutoring-notes repo for easy to read notes on languages I tutor, Tutoring-exercises for some exercises to try out and Tutoring-data_structures for class skeleton examples for Java using generics

multi-agent-surveillance's People

Contributors

gwentinho avatar jolijn2020 avatar laurajogi avatar mahshidghaffari avatar matthewfoster02 avatar s010mon avatar trav-d13 avatar travisd13 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

trav-d13

multi-agent-surveillance's Issues

Interface: Agent

** Depends on Vector **

Create an interface Agent that declares the following methods:

Vector getPosition()
double getDirection()
void Move()
Ray[] getView()
double getHearing()

Class: ManualAgent

Manual Agent class to allow user to control agent actions within the 2D map

Vector: normalise

Add and test a normalise() method that takes no parameters and returns a new vector as a unit vector.

v.normalise() -> new Vector u where | u | = 1

GUI: add Map Builder

** Depends on FileMenu **

Add a class that extends canvas and can be selected using the menu bar to show a blank canvas that will allow the user to draw maps

Rotation Matrix Refactor

Refactor the rotation matrix constructor to take in only a single parameter RotationMatrix(double theta) and generate the sin and cos values within the constructor rather than being passed as parameters.

AgentImp normalise direction vector

** Depends on Vector.normalise() **

Ensure that when constructed and when modified, the direction vector is always normalised to a unit vector before being assigned.

methods to be modified:
public AgentImp
public setDirection

Class: WallFollowAgent

Create constructor with position, direction, radius.

Write (pseudo)code for move method so that the agent follows walls.

Inherits from AgentImp class.

Method: Vector.add(Vector v)

Depends on Class:Vector

Create and test a add(Vector v) method that returns a new vector with the two vectors added together. Ensure that the method is functional (i.e. does not modify the old vector)

Interface: Placeable

Create a Placeable interface with method definition for

boolean hit(Vector v);

Class: Map

** Depends on Settings Class and Agent and Placeable Interfaces**

Create a Map class that holds a list of Placeable objects and a list of Agent objects with the required getters and setters. There should be only one constructor:

public Map(Settings settings)

ray tracing bug

The rays are hitting the "closest" wall in the unit vector direction, which is expected behaviour, however they do this in both u and -v directions. This needs to be remedied

Class: AgentImp

add constructor with parameters maxWalk, maxRun and timeStep(as this is specified by the testmap, and not a constant)

add method setDirection(Vector directions) to change direction
add method setSpeed(double speed) to change speed

update move() method to actually move (does not yet check for walls)

Interface: GraphicsEngine

Create an Interface GraphicsEngine with method declarations for:

Ray[] view(Map map, Agent agent)

Rectangle2D -> Rectangle

We are painting objects using the javafx library, but all the objects are parsed as java.awt.Rectangle2D objects, which are not directly compatible.

The Parser and Settings both need to be converted to use only the javafx.scene.shape.Rectangle package, as it will save future issues when painting objects.

Class: Human

** Depends on Agent and AgentImp**

Create an class that uses a KeyListener to take in the next move that the user wishes to make. The default move should be the zero vector, with the last arrow key pressed saved loaded as the next move.

Note, the next move will only be updated when the move() method is called, this should be overridden to update the agent's position, do not directly update the position using the KeyListener as this will cause the agent to become out of sync with the tics.

Class: FileParser

** Depends on Settings **

Create and test an abstract class FileParser that has only one method:

public static Settings readGameFile(String path)

the method should return a Settings object from the data read in from the game. Think about adding helpful exceptions such as tracking and printing the line on the file that has caused the exception and the last String held before the parser crashed.

Class: RayMarching

** Depends on Interface: GraphicsEngine**

Implement the RayMarching algorithm for the view() method of the GraphicsEngine interface

Limit Field of View

Create a function that takes in an ArrayList<Ray> and a Vector leftLimit and Vector rightLimit and outputs a new ArrayList containing all the vectors that fall within the left and right limits (where left is the first and right is the second direction encountered when moving clockwise from zero)

Add a check that, when the left -> right is or exceeds 360, then the entire array is returned.

Method: Vector.mul(double scalar)

** Depends on Class: Vector**

Create and test a mul(double scalar) method in the vector class that returns a new vector that has been scaled by scalar. Ensure that it is functional and doesn't modify the original vector.

Renderer: Draw Rays

** Depends on Renderer class **

Implement the update(Ray[] rays) method that clears the Renderer and draws all the new rays to the Renderer

Class: AgentImp

Depends on Agent Interface

Create and test a class that implements the Agent interface with the default information for the Agent type, this will include (but not limited to):

  • Move rate Vector per tick
  • Sprint rate Vector per tick
  • Current position Vector
  • Current view Ray[]

Hashable Vector Implementation

Access to already existing graph nodes in computationally efficient way, through their Cartesian coordinates (Their world)

Map equals method

Create a method in Map.java to compare maps

needed to test if maps that are created (and read in again) are the same as the original

Collision Detection

Add a feature that, for each agent every tick, before a move is made, a check is done if the agent will collide with a boundary. If this occurs, then the move is not made.

Best place to put this isn't certain, potentially edit the Agent interface to return a new location:

public void move()   // old interface
public Vector move()   // new interface

this would then be updated using a setPosition method that would be added to the Agent:

Class: Rectangle

** Depends on Placeable **

Create a Rectangle class that implements the Placeable interface and the hit(Vector v) method

MapFileCreater

Create a class that can parse Map objects into .txt files

Class: Settings

Create a Settings class that wraps up all the information in the file in an immutable format. Elements should be kept private and only be read through getter methods to avoid data corruption.

Class: Vector

Build and test a Vector class that holds a 2D reference in space. Include overloaded Constructors:

public Vector() -> [0,0]
public Vector(double x, double y) -> [x, y]

Further methods in other cards

Scatter Rays Bug

Fix the but for scattering rays in 360 degrees.

Currently uses the agent's direction as a start, this should be changed to 0 degrees (north). Test that each output is at the correct direction.

GUI: Add File menu bar

Add a menu bar that can hold a File menu with sub-options of New Open and a Map Builder option as below:

|  File    |   Map Builder   | 
- New
- Open

Map Builder Side Menu

** Depends on GUI: Add Map Builder **

Add a side menu bar to the Map Builder scene that allows the user to select the current object that is to be drawn with buttons for:

  • Agent Spawning Areas [ One button for Guard, one for infiltrator]
  • Furniture Types [Buttons dynamically allocated from the Furniture Type Enum, s.t. adding a new enum will add a new button]
  • Create Button (dummy for the moment, will save details in future)
  • Create & Open Button (does the above and switches to a new simulation/game)

Possible prototype here: https://drive.google.com/file/d/1PJK21Exh-L9cf5D3DXiCRI6wDxYt7zZ4/view?usp=sharing

Feel free to change layout

refactor remove borders

currently a ray must hit a Placeable before a beam is drawn. A new variable maxLoS (max line of sight) should be created in the RayTracing class such that if no object is hit, the ray is still drawn using the maxLoS as a length.

This will supersede the requirement for borders such that they can be removed reducing objects to check

Interface: SoundsEngine

Create an Interface SoundsEngine with method declarations for:

double hear(Map map, Agent agent)

where the output is the current decibel level of sounds

Class: RayTracing

** Depends on Interface: GraphicsEngine**

Implement the RayTracing algorithm for the view() method of the GraphicsEngine interface

Class: Ray

** Depends on Class: Vector **

Create and test a Ray class with two Vectors u and v:

public Ray(Vector u, Vector v)

add a method Ray.angle() which returns the angle u -> v from unit vector [1,0]

Class: SoundCloud

** Depends on SoundsEngine Interface**

Implement an the SoundsEngine with method declarations for:

double hear(Map map, Agent agent)

where the double out is the decibel level heard at the point of the Agent's location. Use the "clouding" method of multiple spawning circles to allow sounds to dissipate and go around corners

Method: Ray.rotate()

Rotate method that produces a new vector at double degrees or double radians rotation (depending on formula used)

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.