Eternal Struggle

246 yurivish 65 8/31/2025, 7:04:03 PM yoavg.github.io ↗

Comments (65)

francisduvivier · 1h ago
Some people here were asking for it so I quickly vibe forked a speed control slider for farming some karma here on Hacker News:

https://francisduvivier.github.io/eternal-struggle-with-spee...

Code: https://github.com/francisduvivier/eternal-struggle-with-spe...

wvbdmp · 56m ago
Not to alarm anyone, but when I ran this, the black ball eventually joined the dark side and the whole thing ended up black. I’m sure this doesn’t mean anything for the greater universe.
soneca · 35m ago
This happened to me in the original site. I think it happens when the white and black balls collide at the exact same spot of the border.
bilbo-b-baggins · 50m ago
Metaphor for American politics.
rnotaro · 49m ago
This vibed coded implementation is buggy.

If you go to 64.00×, it can't slow back anymore.

ks2048 · 23m ago
Yes, going to 32x also won't let you back down to 1x. (16x and lower - yes).
MrJohz · 3h ago
The cool thing about this is that it's self-balancing - if either side gets larger than the other due to random chance, the ball in that side will have more space to bounce in, and therefore bounce less often, slowing its growth. Meanwhile, the ball in the smaller side will bounce more often in its smaller space, making up the ground.
SonOfLilit · 2h ago
There are stableish equilibria that are not 50-50, e.g. one color having a donut around the other color that has a donut hole.
istjohn · 2h ago
Yes, because it's not actually area that balances out but mean time between bounce against the black/white boundary.
n2d4 · 2h ago
Now the question remains, are there stableish equilibria that are 50/50? Splitting it into two half-circles sounds like an equilibrium at first glance, but I'm not convinced it is, as only a tiny bit of random luck seems to make it become a "horseshoe" pattern instead.

(That assumes that the simulation is randomized of course, which doesn't seem to be the case for the one in the link posted here.)

Animats · 1h ago
It's amazing how stable it is. It's been running in a background tab for a hour now, and it still has the yin/yang look.
Liron · 1h ago
I think the balls stop when the tab isn't focused
teamworketernal · 2h ago
I was cheering on the black circle's tunneling project when they both got caught in a rapid-fire spiral and the black one glitched through to the other side.

https://imgur.com/a/dhCSNmi

volemo · 2h ago
The darkness has come upon the world!
panarchy · 1h ago
I think it misinterpreted what kind of tunneling you were cheering on.
cocoto · 2h ago
Had the exact same bug! Not so rare I think.
camtarn · 2h ago
Hah! I was wondering if that was possible.
alyxya · 2h ago
I watched it for an hour, and at some point the black ball crossed the boundary onto the black side, so eventually the whole circle became black.
drob518 · 1h ago
It went to the dark side.
hk__2 · 3h ago
SkipperCat · 3h ago
An excellent piece of artwork! Really captures the meaning of Yin Yang, at least to me.
Insanity · 3h ago
I guess it’s supposed to start on mouse move (based on skimming the source code).

On a phone it doesn’t seem to trigger unless I changed the background so I spent a minute just staring at the symbol without anything happening lol :D

chunkles · 2h ago
If you tap on the ying-yang it starts.
bqmjjx0kac · 1h ago
Hmm, not on iOS Safari.
Insanity · 47m ago
Yup that’s the browser I am using as well.
sabellito · 2h ago
Got a horseshoe shape running at 50x for 60 seconds:

https://imgur.com/a/b6b2IDx

andoando · 29m ago
Same, if one of them punches through in one place, that hole shapes the angle of the bounces and reinforces itself and the other side fills in around the hole.
Lerc · 1h ago
I made a game on this principle many years ago. Two players with turn left,turn right, thrust and fire. You can only exist in your own space, shooting at the walls dug holes of your colour.

You had a bunch of critters scattered around the map trying to get home and you had to make paths for them while stopping your opponent from getting their critters home.

darkstarsys · 2h ago
Cool! It would benefit from better physics though, maybe supersampling the position in time especially when moving fast. Each ball can't push to its edge fully, for instance.
clocker · 38m ago
reminded me of this one that ends at some point

https://ask5.github.io/gold-wars/

federico-peconi · 2h ago
so simple yet so deep!

anyone willing to provide a math-proof like argument on why the shape seem to stick to the YY curve indefinitely as the "eternal" name suggests?

Should it always be this way or is there at least one bad initial bouncing configuration for which chaos can take place and we loose the YY curve?

Does not seem that obvious to me.

crazygringo · 1h ago
It doesn't. It quickly just becomes a random curve after a few minutes at normal speed if you leave it open.

For obvious reasons it tends to stay half white half black (if one half gets smaller its ball will bounce faster) but the shape and its orientation varies randomly.

stephenlf · 2h ago
I think it’s just random chance. I haven’t run any simulations or anything, but I suspect the YY curve is no more stable than any simple 50-50 split. I bet over large timespans the YY curve straightens out just from entropy.
geor9e · 2h ago
It doesn't. Seems to be like a lava lamp until one ball breaks thru. See the other comment with the console command to edit the speed.
panarchy · 3h ago
$10 on black
jama211 · 4h ago
I’m really keen to see what this looks like after significant time but I’m not going to leave it open on my phone for ages just to find out haha. Clever idea!
personalcompute · 3h ago
fxwin · 2h ago
https://i.imgur.com/cf1wOwL.png after a few minutes of running it at 240 frames per second :D
cmertayak · 2h ago
I desperately needed that :D
xav_authentique · 2h ago
You can execute this in the devtools console:

data.whiteBall.v.x = 5; data.whiteBall.v.y = 5;

data.blackBall.v.y = 5; data.blackBall.v.x = 5;

cdrini · 2h ago
Wow! Careful Icarus, going too fast makes it go kind of wild and started freezing the site :P

data.whiteBall.v.x = data.whiteBall.v.y = data.blackBall.v.y = data.blackBall.v.x = 10;

obventio56 · 2h ago
Also frameRate() with 120 or higher will make it go a bit faster. But it seems like there is a limit. I'm not familiar with p5.
axblount · 2h ago
Does some interesting things if you up the ball speed to 20. The boundary breaks down.

  data.blackBall.v = data.whiteBall.v = createVector(0, 20);
cocoto · 2h ago
Mine broke even without speeding up things, the black ball is now working together with the white ball.
amelius · 2h ago
What would a 3d version of this look like?
smusamashah · 2h ago
Something similar was shared before, but it wasn't this shape, just plain old rectangle style.
mensetmanusman · 2h ago
What happens at the limit of infinity!
joshdavham · 2h ago
Is there any interesting mathematics associated with this system?
jomarry · 2h ago
I cant perfectly cause i dont know how to control. . I dont have any loptop for use to creat it. I use my phone
hlava · 2h ago
Are there any initial conditions that converge to a line?
dvh · 2h ago
I see that you haven't seen alphaPhoenix' video about reverse game of life. I highly recommend it.
AlexCoventry · 1h ago
Manicheanimation
makepanic · 3h ago
You can press P to toggle the edge point visibility.
swayvil · 2h ago
How on phone?
swayvil · 2h ago
It's cool.

It would be better if there was only 1 kind of edge instead of 2.

I refer to the broken edge and the circle edge.

MarcelOlsz · 3h ago
Cool now I'm not going to get anything done. Thanks OP. PLEASE add a speed control so I can speed it up to it's logical conclusion and move on with my day.
alwa · 2h ago
I too am impatient to learn the logical conclusion of “eternal struggle.”
romaaeterna · 2h ago
An edge point's probability of being hit should be proportional to the length of every path leading to that edge point. An area closer to many short black paths and many long white paths will show black expansion (and vice-versa). So I suspect that any variation of the central line from a straight bisection of the circle should get hammered out over time.
fxwin · 2h ago
you can run frameRate(x) in your browser's console to speed it up a bit - might be limited by your monitor's refresh rate though
riku_iki · 3h ago
you can keep tab open and check in few weeks.
cmertayak · 2h ago
Please let us know what happens.
riku_iki · 34m ago
Its interesting that my is converging into straight line dividing circle half/half, unlike other examples in the comments.
foolserrandboy · 1h ago
yang gang LFG!
cluckindan · 2h ago
Now that we have the simulation, what is the closed form solution?
barbazoo · 3h ago
I laughed really hard at this :)