Difference between revisions of "Vacuum cleaner"
(21 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
=Interface controls= | =Interface controls= | ||
− | + | [[File:Kitchen.JPG|thumb|right|100px|Kitchen]] | |
+ | [[File:Living_room.JPG |thumb|right|100px|Living room]] | ||
+ | [[File:Kids_room.JPG |thumb|right|100px|Kids room]] | ||
+ | [[File:Training.JPG |thumb|right|100px|Training]] | ||
+ | [[File:Empty.JPG |thumb|right|100px|Empty]] | ||
===Setup=== | ===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. | 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. | ||
+ | [[File:Circles.JPG |thumb|right|100px|Circles with walls]] | ||
+ | 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 | ||
+ | |||
+ | =Results= | ||
+ | I tried with BeahviourSpace plugin to go with each algortihm thorugh each room 100 times. Needless to say, that each one finishes the room, just amount of ticks differ. | ||
+ | |||
+ | Averages: | ||
+ | Random : 8160,338 ticks | ||
+ | Circles with walls : 4437.41 ticks | ||
+ | Vision : 10930.662 ticks | ||
+ | Circles walls with vision: 4366.222 ticks | ||
+ | |||
+ | I found it quite weird that random got better average score than vision. So i tried to make vision higher. When having vision 2 patches around itself suddenly creates signifacantly better results. | ||
+ | |||
+ | Vision 2 : 3263.134 | ||
+ | Vision 3 : 2595.164 | ||
+ | |||
+ | Result then would be - if vacuum cleaner can see bigger spaces around itself it is best to make him move by that. If it can't see far enough - circling around itself and than around walls would be the best strategy then. | ||
+ | |||
+ | [[Media:Results_Vacuum_xkorj58.zip]] | ||
+ | [[File:Results Vacuum xkorj58 v.2.zip]] | ||
+ | |||
+ | http://www.uschovna.cz/zasilka/JDAESA63KE6L8YYA-427/ - I couldn't upload to simulace.info, so i uploaded on this link - will be there until 2.2.2019 | ||
+ | |||
+ | =Conclusion= | ||
+ | Best way to clean your room with AI vacuum cleaner is have its algorithm see around itself. But the area has to be big, if cleaner can't see that far away, best algorithm to use is circling. Nowadays but, there are new cleaners that can scan room before they start cleanup, so they could optimize it's path and be way more effective. | ||
+ | |||
+ | [[Media:Xkorj58-vacuum.nlogo ]] | ||
+ | |||
+ | http://www.uschovna.cz/zasilka/JDL5P55VGKJKHYBZ-P8A/ | ||
+ | I couldn't upload anything to simulace.info, so here is simulation itself. All images and result are also on external websites. Results and simulation will be available until 2.2.2019 [[User:Xkorj58|Xkorj58]] ([[User talk:Xkorj58|talk]]) 15:31, 19 January 2019 (CET) |
Latest revision as of 18:49, 3 February 2019
Contents
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.
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.
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.
Training
Easy room, made for practicing running around walls. Walls having right hand and left hand corners.
Empty
Empty room without any furniture.
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.
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
Results
I tried with BeahviourSpace plugin to go with each algortihm thorugh each room 100 times. Needless to say, that each one finishes the room, just amount of ticks differ.
Averages:
Random : 8160,338 ticks Circles with walls : 4437.41 ticks Vision : 10930.662 ticks Circles walls with vision: 4366.222 ticks
I found it quite weird that random got better average score than vision. So i tried to make vision higher. When having vision 2 patches around itself suddenly creates signifacantly better results.
Vision 2 : 3263.134 Vision 3 : 2595.164
Result then would be - if vacuum cleaner can see bigger spaces around itself it is best to make him move by that. If it can't see far enough - circling around itself and than around walls would be the best strategy then.
Media:Results_Vacuum_xkorj58.zip File:Results Vacuum xkorj58 v.2.zip
http://www.uschovna.cz/zasilka/JDAESA63KE6L8YYA-427/ - I couldn't upload to simulace.info, so i uploaded on this link - will be there until 2.2.2019
Conclusion
Best way to clean your room with AI vacuum cleaner is have its algorithm see around itself. But the area has to be big, if cleaner can't see that far away, best algorithm to use is circling. Nowadays but, there are new cleaners that can scan room before they start cleanup, so they could optimize it's path and be way more effective.
http://www.uschovna.cz/zasilka/JDL5P55VGKJKHYBZ-P8A/ I couldn't upload anything to simulace.info, so here is simulation itself. All images and result are also on external websites. Results and simulation will be available until 2.2.2019 Xkorj58 (talk) 15:31, 19 January 2019 (CET)