Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: No seeds? No problem! Let cellular automata do it. (.GIF  (Read 902 times)

Mechanoid

  • Bay Watcher
  • [INTELLIGENT]
    • View Profile
No seeds? No problem! Let cellular automata do it. (.GIF
« on: May 27, 2008, 11:26:00 pm »

We all know valley herbs and bloated tubers (among others) have no seeds, and cannot be grown in farms. But, how about we give our herbalists the ability to transplant these difficult to supply plants into farms, and then let the game run a cellular automata on them, within the boundaries of the farm and local landscape?

The interface would barely need changing at all; the plants without seeds would be selected for planting like normal seeded plants would, and appear as green when they can be grown in-season and blue when out of season. Once the plant is selected, herbalist dwarves start to look for plant gather designations that are relevant to the plant in question. Once found, the herbalist grabs the plant, and transplants it into the farm. Then, the cellular automata takes over. The herbalist will continue to transplant until the field is set to fallow.

Then, you wait for the automatic growth to fill the field with a "stable" patern. During off-seasons, the plants will "freeze" in place and stop growing. Sometimes, possibly die off. Then when they come back into season, they re-activate and start doing their cellular automata thing again.

[ May 28, 2008: Message edited by: Mechanoid ]

Logged
Quote from: Max White
"Have all the steel you want!", says Toady, "It won't save your ass this time!"

Draco18s

  • Bay Watcher
    • View Profile
Re: No seeds? No problem! Let cellular automata do it. (.GIF
« Reply #1 on: May 28, 2008, 12:25:00 am »

Technically "tuber" plants are ones that grow from a bulb (think tupips) and regrow from the same bulb year after year, however, they're also typically harvested for that edible bulb.  What we need are plant cuttings, these when planted then grow (without seed) to form a new plant (this is how we got modern seedless bananas), most real world tubers reproduce this way.
Logged

Mechanoid

  • Bay Watcher
  • [INTELLIGENT]
    • View Profile
Re: No seeds? No problem! Let cellular automata do it. (.GIF
« Reply #2 on: May 28, 2008, 01:10:00 am »

In that case Draco, the farmers workshop would be the place for that to happen. But for something like valley herb, which suggests that it isn't a tuber but instead a seedless plant that grows by expansion, then in that case, my suggestion would be perfect. Here's a animated gif i made to demonstrate:

   

Valley Herbs, in this example, have a "Surive: 2, 4" and a "Birth: 1, 3"
That is, a cell will survive if it has 2 or 4 neighbors, dying otherwise, and 'growing' if it is alone, or has 3 neighbors. After about 60 generations, the example above stabilized into an oscillating pattern that generated 'spare' plants. (basically, a living valley herb in each corner will "bounce" between the boundry of the farm, leaving behind herbs that naturally die off if not harvested)

Protip: If you're having trouble seeing the gif because of your xbawks heug screen resolution, go to the Start menu> All Programs> Accessories> Accessability> Magnifying Glass

[edit]
I ran the Life32 simulation again, and the above farm becomes stable 50 generations after the last frame. Though it's arbitrary, every 10 in-game days should equal 1 generation, which means 500 in-game days will have to pass before the valley herb patch above becomes "stable" enough to farm reliably.

[ May 28, 2008: Message edited by: Mechanoid ]

Logged
Quote from: Max White
"Have all the steel you want!", says Toady, "It won't save your ass this time!"

Draco18s

  • Bay Watcher
    • View Profile
Re: No seeds? No problem! Let cellular automata do it. (.GIF
« Reply #3 on: May 28, 2008, 10:41:00 am »

Conway's Game of Life, got it.

quote:
Originally posted by Mechanoid:
<STRONG>Protip: If you're having trouble seeing the gif because of your xbawks heug screen resolution, go to the Start menu> All Programs> Accessories> Accessability> Magnifying Glass</STRONG>

Stupid people and their xbawkses.

Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: No seeds? No problem! Let cellular automata do it. (.GIF
« Reply #4 on: May 28, 2008, 11:19:00 am »

I also meant topost a bit more, but I had to get to class (which, oddly, hasn't started yet).

My only critique is that the tubers "move around" on the mapand that it doesn't really make sense.

Also, on CGoF:

quote:
Valley Herbs, in this example, have a "Surive: 2, 4" and a "Birth: 1, 3"

The survive is correct, however, the birth value is on the UNliving squares: it has to border 3 living ones in order to grow.  As for "birth 1" in the way you meant it, it's possible to end up with a scenario where everything still dead (I understand it was to prevent the sole survivor from dying such that you have noting).
This will die completely:
_____
_""__
_____

Logged

Mechanoid

  • Bay Watcher
  • [INTELLIGENT]
    • View Profile
Re: No seeds? No problem! Let cellular automata do it. (.GIF
« Reply #5 on: May 28, 2008, 06:27:00 pm »

quote:
Originally posted by Draco18s:
My only critique is that the tubers "move around" on the map and that it doesn't really make sense.

The plants don't "move around" as such and instead they grow into the nearby farm plots, and then depending on the way the plant grows, it either survives or dies off. What looks like movement is actually a plant that spawns a plant next to it, and then dies soon after that expansion. In-game there would be a "withered" version of the plant that had died off in the cell, which would then be taken off to the refuse pile by haulers /herbalists /farmers that arn't doing anything.
Of course these withered plants would block plant growth, so maintaining fields would be a continual job.

[edit]
Also Draco, you are correct that the dead cells need a number of living cells to become living themselves, but the example you gave is still capable of growing; though the original two cells do die off after doing so.

[ May 28, 2008: Message edited by: Mechanoid ]

Logged
Quote from: Max White
"Have all the steel you want!", says Toady, "It won't save your ass this time!"

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: No seeds? No problem! Let cellular automata do it. (.GIF
« Reply #6 on: May 28, 2008, 07:43:00 pm »

I don't think the Game of Life being implemented in DF makes sense since it's not very realistic, and I've always felt that plant tiles are semi-abstracted to indicate a patch of said plant, not just one.
Logged