Git Product home page Git Product logo

visulisation-of-large-data's Introduction

Compression Algorithm / Visulisation Of Large Data

Example image

Project Overview:

The Game Idea: the player would navigate through a level that would consist of 2 or more rooms, each room would be a sqaure and therefore have a possibility of 4 different pathways from each room.

Example of 5 x 5 Level:

Example of 5 by 5

The level would have a start and finish where the player would then complete that level. The levels should be randomly generated and always have a start and finish that are connected by atleast 1 route.

Example of 5 by 5 With Route

Visulisation:

My Visualisation Script:
P5.JS Sketch
Level Codes

The need to visulise these levels arose when creating these strings, as they were hard to visulise from looking at the directions given in the strings.

Compression:

Basics of an Uncompressed level string:

Path Directions Width Height
SE,SE,SE,E,NE,SE,E,W,S,NE,SE,E,W,W,NW S,NS,E,W,NW,W,N,S,W,NW ,05 ,05

Basics of an Compressed level string:

Width Path Directions Height
5 EEECGECDBGECDDHBICDHDABDH 5

Uncompressed code = SE,SE,SE,E,NE,SE,E,W,S,NE,SE,E,W,W,NW S,NS,E,W,NW,W,N,S,W,NW,05,05

Compressed code = 5EEECGECDBGECDDHBICDHDABDH5

Compressing Reduction %:

Basics of our compression algorithm 1 room can have 4 possible paths connected, this gives a possibility of 256 connections that 1 room can have.

The program that was responsible for generating the level codes was adapted to generate a number of levels and giving feedback on the percentage of how often any given possibility shows up.

possible outcomes

From this data we were able to identify the most common combinations of paths and from these, assign these combinations to letters ranging from A-O For example: a level code contains a room with NW meaning that this room has a path on the North and West face, this combination would be reduced to just H.

Example : Uncompressed code = SE,SE,SE,E,NE,SE,E,W,S,NE,SE,E,W,W,NW S,NS,E,W,NW,W,N,S,W,NW,05,05

Compressed code = 5EEECGECDBGECDDHBICDHDABDH5

"A" - "N"
"B" - "S"
"C" - "E"
"D" - "W"
"E" - "SE"
"F" - "SW"
"G" - "NE"
"H" - "NW"
"I" - "NS"
"J" - "EW"
"K" - "SEW"
"L" - "NEW"
"M" - "NSW"
"N" - "NSE"
"O" - "NSEW"

Reduction

For a 5 x 5 level 11.5 Characters were reduced or 29.3% Reducing the "," --- 34 Characters were reduced or 55.7% For a 10 x 10 level 30 Characters were reduced or 22.1% Reducing the "," --- 140 Characters were reduced or 57.3% For a 50 x 50 level 817 Characters were reduced or 24.5% Reducing the "," --- 3322 Characters were reduced or 57.0%

visulisation-of-large-data's People

Contributors

oq2000 avatar

Watchers

 avatar

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.