Difference between revisions of "Vacuum cleaner"

From Simulace.info
Jump to: navigation, search
Line 45: Line 45:
 
Empty room without any furniture.
 
Empty room without any furniture.
 
https://imgur.com/a/zVZB3yK
 
https://imgur.com/a/zVZB3yK
 +
 +
===Robots===
 +
 +
Number of vacuum cleaning robots.
 +
 
===Path===
 
===Path===
  

Revision as of 15:10, 19 January 2019

Introduction

Goal of this Netlogo simulation is to imitate AI of self-moving vacuum cleaner. It's aim is to clean whole room from dust by moving around it and sucking mess out of carpet or ground in general. Nowadays AI in these vacuum cleaners differs. Easiest one is just to randomly move around the room and in enough time room will be cleaned. I'm trying out to figure out few algorithms to make vacuuming faster and therefore more effective.

Problem definition

At first I created few rooms, each with different distribuition of furniture and items in it. Making it either harder to go through or make some cleaners to get stuck. Rooms also have different amount of dust in it, which can make vacuuming longer. Algorithms should optimize time needed for getting rid of dust in room. Measure will be ticks in Netlogo.

Software

Simulation was created in Netlogo 6.0.4.

Agents

Turtles

In this simulation there is only one type of turtle agent - vacuum cleaner. It has one variable (not used in all of used algorithms) called "next-to-wall" Vacuum cleaner is always sprouted somewhere in the room - not inside of a piece of furniture, heading north.

Patches

Patch agents are either brown - furniture and items on ground, black - floor tiles with dust on them, or white - cleared floor tiles.

Model Settings

World of this simulation doesn't wrap - rooms are closed. It's 32x32 patches big and it's origin corner is bottom left one.

Interface controls

Setup

Prepares world. At first it clears previous world. After that sets up new world. It creates chosen room and furniture. Then it creates cleaner/s somewhere on the ground. It also resets tick counter.

Go

This makes cleaner to vacuum dust underneath it. Then it moves it by chosen algorithmic path and vacuums again - making it as usefull as it can be. In the end it ticks once, for ticks to be counted as measurement of effectivity of cleaning algorithm.

Room

I created 3 layouts of a room. Each one with different furniture, making it either harder to go trough or easier.

Kitchen

Kitchen corner with desk. Big table in the middle of the room and 8 chairs - 4 legs each. https://imgur.com/a/8sme1jO

Living room

Living room has a sofa, TV, armchair, teatable, and 3 libraries. This one would be the easiest one to go through, due to not many small items in it and all furniture being quite symetrical. https://imgur.com/a/QT31Abp

Kids room

Probably the hardest one to go through. It has big bed, desk with chair, one long locker, one small locker and 3 toys. One of the toys is not symetrical with dead end. https://imgur.com/a/3AJw7XX

Training

Easy room, made for practicing running around walls. Walls having right hand and left hand corners. https://imgur.com/a/5OuKsL9

Empty

Empty room without any furniture. https://imgur.com/a/zVZB3yK

Robots

Number of vacuum cleaning robots.

Path

Random

If possible, moves forward and randomly turns in some direction.

Circles with walls

At first it tries to find a wall it circles around, making the circle bigger and bigger until it reaches wall (or furniture). When it reaches wall it goes around it and cleans around walls. When it hits cleaned spot in front of itself starts going around again making it go around more times. It also counts stuck points - to see if its moving too long on cleaned area or is hitting wall too often. If it does it randomly spins, heading other directions. This perk makes it sometimes little bit longer to finish cleaning, but makes the clearer never to get stuck. https://imgur.com/a/GoFvLDA

Vision

This algorithm makes vacuum cleaner look for dust around itself. If it finds it, heads the cleaner towards the dust patch. If it doesn't it chooses it's direction randomly.

Circles walls with vision

It is a combination of previous two algorithms. It makes cleaner circle around until it finds wall. But instead of heading randomly, if getting stuck, it looks around itself and if finds dust it heads its direction