473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cone stacking algorithim

RedSon
5,000 Recognized Expert Expert
Greetings all,

Last weekend I was at my son's football class (soccer). Every week they play this game where the coach scatters a bunch of cones across the field, and the kids pretend they are trees. The goal is to kick the ball from one end of the field to the other without hitting the cones. Anyway that is not what piqued my interest.

What did pique my interest was the time when everyone was made to clean up. What happened was this: The kids all scattered about picking up cones, each had one or two in their hands, then they would look at the kid next to them and they would combine their stacks and each kid would combine their stacks with other kids until the coach came by and added their little stacks to the master stack. But to complicate things, the kids would not stop gathering cones and stacking them, sometimes they would make a new stack, or sometimes they would add to a stack they created. Some kids would then go around and collect other kid's stacks and place them on to their stack. Or sometimes they would leave their stack alone and go collect somewhere else waiting for the coach or some other kid to pick theirs up.

So the question is, how could someone model this real world behavior in code? Does this behavior sound like any known algorithms?

It seemed like a modified merge sort to me, but I like to think of the kids as agent sorters so there must be some kind of recursive element to it. Also there has to be some work in deciding how many agents are optimal, and what is the maximum stack size. Also there is an element of "load balancing" where the little sorting agents will abandon their area if it is stacked and move to a more entropic area.

If anyone would like to start analyzing this behavior with me please add your thoughts.
Sep 17 '09 #1
6 3100
JosAH
11,448 Recognized Expert MVP
It's equivalent to a Capacitated Vehicle Routing Problem (CVRP); it's a filthier problem than just a few 'simple' Travelling Salesmen Problems (TSP) and can take hours to solve when the capacity restrictions vary per vehicle/child. If the coach/depot of the system is moving itself the catastrophy is imminent. Don't go there.

kind regards,

Jos
Sep 18 '09 #2
RedSon
5,000 Recognized Expert Expert
Interesting reading. But from what I see a CVRP contains vehicles originating from one depot. So that means this would be particularly difficult since there would be multiple depots in the system.

If anyone has access to literature say from ACM or elsewhere or knows where to find full text research papers on this I would be very thankful if you would share.
Sep 18 '09 #3
JosAH
11,448 Recognized Expert MVP
@RedSon
If there's only one coach and all the cones have to be handed over to him/her then this is also a single depot CVRP. The 'C' comes from the fact that kids can only carry so many cones maximum. Most of the time goes into solving a TSP per kid over and over again.

Those problems typically result in a 'flower shape' solution: the coach is the center of the flower and all the tours make up the leaves of the flower. Multiple depots add to the complexity of the CVRP. If the depots are moving I don't even want to try to solve this ;-)

A couple of Greek guys really worked on this problem: Bertsimas and Bertsekas and Papedimitriou come to mind (google for them and double check my spelling). Especially the last guy did quite a bit of work on the big-Oh aspect of these dirty problems. Also check Karel Lenstra and Alexander Schrijver (twp Dutchmen, yea!) who did a lot of work on 'local search' heuristics.

kind regards,

Jos
Sep 18 '09 #4
Glenton
391 Recognized Expert Contributor
It would be interesting to see if you could get similar complex global behaviour from a simple set of local rules. In other words, build a model with a bunch of "koids" (as opposed to "boids") who only see a certain radius. Then they have a couple of simple rules about which direction to go to pick up visible cones, add them to their stack, drop their stack and hand their stack to the coach.

I would bet that a handful of simple rules will give you a good representation of the the way the kids buzz around. It works for boids anyway!

As for optimizing the collection method - well that's a different story altogether... But you could tweak the rules and see if you can find anything that works better. Then the kids just need to be told the new "rules"! Now there's the real challenge...

I'm sure you could find someone to publish it - talk to the Santa Fe Institute!
Dec 14 '09 #5
RedSon
5,000 Recognized Expert Expert
Can you describe more about this "boid" thing? Where are you getting that term from?
Jan 15 '10 #6
Glenton
391 Recognized Expert Contributor
It's a mixture of bird and android I guess.
http://en.wikipedia.org/wiki/Boids
http://www.red3d.com/cwr/boids/
developed by Craig Reynolds...
Jan 17 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: S. Nurbe | last post by:
Hi, How can I program this math. equation: a1*n1 + a2*n2 + a3*n3 = cos(alpha1) b1*n1 + b2*n2 + b3*n3 = cos(alpha2) n1^2 + n2^2 + n3^2 = 1 The problem is, that when you solve for n1, n2 and...
36
by: Ben Justice | last post by:
For a program in c, I need some random numbers for a system were people are placing bets. This is not a commerical project btw. Generally, I tend to rely on things from the standard library,...
14
by: invincible | last post by:
Hi I want to find an algorithim , which calculates shortest perpendicular distance from a given point to a line. Thanks Mohan
1
by: | last post by:
How do I control the layering of 4 forms of identical size and position to cause the desired form to be second from the top.. Form1 has my welcome screen etc.and the code for file manipulations...
7
by: mturner64 | last post by:
I need the formula to calculate the girth of a cone. I am not having any luck. Anyone know the formula? Thanks, Mike
28
by: DaemonCoder | last post by:
The challenge is to create the shortest algorithim, In any programming language. RULES: 1. All code must be on one line. 2. Languages that prevent this are disallowed. I.E Assembly, and of...
0
tharden3
by: tharden3 | last post by:
The links and buttons are stacking up and I need space between them. Please help me fix this. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"...
1
by: matthewaveryusa | last post by:
I have a timer T that launches an event on each tick: void t_Tick(object sender, EventArgs e) { System.Threading.Thread TickThread = new...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.