# Color convergence

Hello,

I'm pondering over this research question.

Let's suppose you've got a bunch of units which can be colored black or white. They're roaming around 2d grid in random walk. Any time a unit meets with another unit, it has an option to change color. It doesn't have to though, depending on its internal logic. The point is to calculate how long will it take until all units over the grid are of the same color.

Anybody knows what this problem is called, and how to model it? Any advice would be appreciated.

I'm thinking of simple strategy like each unit counts the number of black and white units it met with, and as soon as one number exceeds the other, the unit will change color. Any ideas how to math model this?

Thanks,

Monte

phinds
Gold Member
I'm thinking of simple strategy like each unit counts the number of black and white units it met with, and as soon as one number exceeds the other, the unit will change color.

And I'm thinking you might want to rethink that.

EDIT: snippy, smart-*** comment deleted.

Last edited:
Phinds,

Got you, but just to make sure we're on the same page here:

if unit color is black and it sees one white unit then 1 > 0 (like you say) and it flips color because it simply assumes the most frequent color amongst units it has seen. Each unit keeps count of white and black units it has seen.

I simulated this approach - it does converge. Question is how to model this mathematically (it's pretty simple to program.)

Also, if you have a simpler approach amenable to modeling it would be great also. Any ideas if this is some canonical (or well known problem)?

Thanks,

Monte

phinds
Gold Member
Phinds,

Got you, but just to make sure we're on the same page here:

if unit color is black and it sees one white unit then 1 > 0 (like you say) and it flips color because it simply assumes the most frequent color amongst units it has seen. Each unit keeps count of white and black units it has seen.

I simulated this approach - it does converge. Question is how to model this mathematically (it's pretty simple to program.)

Also, if you have a simpler approach amenable to modeling it would be great also. Any ideas if this is some canonical (or well known problem)?

Thanks,

Monte

I don't know this kind of problem, so no help to you there.

It does seem that your approach seems easy to model, but boring. It would be more interesting if the rules were more complex.

Now that I think about it there used to be a "game" that programmers loved to play (and may still for all I know) that is EXACTLY the same kind of thing. Try looking that up on the Internet and see if it helps you out. Try Googling "game of life".