- 1 Introduction
- 2 Problem definition
- 3 Agents
- 4 Model Settings
- 5 Interface controls
- 6 Results
- 7 Conclusion
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.
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.
Simulation was created in Netlogo 6.0.4.
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.
Patch agents are either brown - furniture and items on ground, black - floor tiles with dust on them, or white - cleared floor tiles.
World of this simulation doesn't wrap - rooms are closed. It's 32x32 patches big and it's origin corner is bottom left one.
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.
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.
I created 3 layouts of a room. Each one with different furniture, making it either harder to go trough or easier.
Kitchen corner with desk. Big table in the middle of the room and 8 chairs - 4 legs each.
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.
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.
Easy room, made for practicing running around walls. Walls having right hand and left hand corners.
Empty room without any furniture.
Number of vacuum cleaning robots.
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.
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
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.
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.
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
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)