Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Cellular Automata
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  20 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Verdagon  
View profile  
 More options Jul 25 2005, 1:07 pm
Newsgroups: rec.games.roguelike.development
From: "Verdagon" <Verda...@gmail.com>
Date: 25 Jul 2005 10:07:23 -0700
Local: Mon, Jul 25 2005 1:07 pm
Subject: Cellular Automata
Hey everyone. I recently made my own cave generator based on Brian's
Cellular Automata at
http://www.herassmygod.org/bcr19374/programming/cellular/ and it works
beautifully.

What I don't understand is how it works. When I looked at the source
code, it says that "if at least X amount of tiles are within 1 radius
of a tile, and at most Y amount of tiles are within 2 radius of a tile,
then the tile changes".

I can't see the logic behind the "at most Y amount of tiles are within
2 radius" part. I don't really HAVE to, because it works fine with a
30% fill with a 4 0 2 generation and that's all I really need. But I'm
curious...

Can anyone explain this to me? Thanks!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
NIm  
View profile  
 More options Jul 25 2005, 4:17 pm
Newsgroups: rec.games.roguelike.development
From: "NIm" <bladedpeng...@gmail.com>
Date: 25 Jul 2005 13:17:20 -0700
Local: Mon, Jul 25 2005 4:17 pm
Subject: Re: Cellular Automata

Usually, a cellular automaton uses the number of adjacent squares;  if
5 or more squares are squares in radius 1, the cell is a wall,
otherwise, a floor. The problem with this is that it tends to generate
large open spaces, which are uninteresting as far as roguelikes go. the
soulution is to take any uninteresting tiles, those that are all alone,
and make that area more interesting, by adding walls to it.  I just
makes the map more interesting is all. I find that I haven't needed to
do that, that I get interesting enough maps with 1 generation and 42%
fill. There are lots of interesting things you can do with cellular
automata.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jimrandomh  
View profile  
 More options Jul 25 2005, 4:52 pm
Newsgroups: rec.games.roguelike.development
From: jimrandomh <usenetNOS...@jimrandomh.org>
Date: Mon, 25 Jul 2005 20:52:08 GMT
Local: Mon, Jul 25 2005 4:52 pm
Subject: Re: Cellular Automata

The page you referenced is unreachable (invalid domain name), but that
rule sounds like what I described in this article:
  http://www.jimrandomh.org/misc/caves.html
(second draft with nice HTML formatting of article first published as
http://www.jimrandomh.org/misc/caves.txt), which explains the reasoning
behind the radius-2 rule. It fills in big empty spaces without breaking
connections, so that you can seed with a lower fill and usually get a
uniform looking, connected dungeon.

--
CalcRogue: TI-89, TI-92+, PalmOS, Windows and Linux.
http://calcrogue.jimrandomh.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
The Sheep  
View profile  
 More options Jul 25 2005, 5:19 pm
Newsgroups: rec.games.roguelike.development
From: The Sheep <thesheep@ sheep.prv.pl>
Date: Mon, 25 Jul 2005 21:19:28 +0000 (UTC)
Local: Mon, Jul 25 2005 5:19 pm
Subject: Re: Cellular Automata
At Mon, 25 Jul 2005 20:52:08 GMT,

 jimrandomh wrote:
> "Verdagon" <Verda...@gmail.com> wrote:
>> Can anyone explain this to me? Thanks!

> The page you referenced is unreachable (invalid domain name), but that
> rule sounds like what I described in this article:
>   http://www.jimrandomh.org/misc/caves.html

Would you agree to put it on roguebasin?

--
 Radomir `The Sheep' Dopieralski    @**@_
                                    (`') 3  Grrr!
                     .   .  . ..v.vVvVVvVvv.v.. .


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Verdagon  
View profile  
 More options Jul 25 2005, 9:24 pm
Newsgroups: rec.games.roguelike.development
From: "Verdagon" <Verda...@gmail.com>
Date: 25 Jul 2005 18:24:36 -0700
Local: Mon, Jul 25 2005 9:24 pm
Subject: Re: Cellular Automata
Ah yes, sorry bout the link. The real ones are those you posted...

"It fills in big empty spaces without breaking connections, so that you
can seed with a lower fill and usually get a uniform looking, connected
dungeon."

What does "seed with a lower fill" mean?

Oh, another question I've been meaning to ask: when I tried the "4-5"
thing on your site (Fill: 45%, R1Cutoff: 4, R2Cutoff: 5 Repeats: 5) all
I got was a huge map, all walls, with one piece of floor. What's going
on?

Thank you very much for your time. I really appreciate it!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jimrandomh  
View profile  
 More options Jul 25 2005, 10:19 pm
Newsgroups: rec.games.roguelike.development
From: jimrandomh <usenetNOS...@jimrandomh.org>
Date: Tue, 26 Jul 2005 02:19:06 GMT
Local: Mon, Jul 25 2005 10:19 pm
Subject: Re: Cellular Automata

"Verdagon" <Verda...@gmail.com> wrote:
> Ah yes, sorry bout the link. The real ones are those you posted...

> "It fills in big empty spaces without breaking connections, so
> that you can seed with a lower fill and usually get a uniform
> looking, connected dungeon."

> What does "seed with a lower fill" mean?

You initialize (seed) the map by making some percentage of tiles
walls (fill). So by this I meant, make fewer of the tiles walls
initially.

> Oh, another question I've been meaning to ask: when I tried the
> "4-5" thing on your site (Fill: 45%, R1Cutoff: 4, R2Cutoff: 5
> Repeats: 5) all I got was a huge map, all walls, with one piece of
> floor. What's going on?

> Thank you very much for your time. I really appreciate it!

Ah, I think I see where the confusion comes from. The "4-5" rule is
this:
 Tile T will be filled if either
  - T is already filled *and* at least 4 of its neighbors are filled
  - T is not yet filled *and* at least 5 of its neighbors are filled

This is the same thing as saying
  Tile T will be filled if the number of tiles within one step of T,
  including T itself, is at least 5.

But this is not the function which my sample program uses. The
function I use is
  Tile T will be filled if the number of tiles within one step of T,
  including T itself, is at least R1Cutoff OR the number of tiles
  within TWO steps of T, including T itself, is at MOST R2Cutoff.

So, if R1Cutoff=4 and R2Cutoff=5, that will happen almost all of the
time.

Anyways, the function I eventually chose as the 'best' answer was
  Fill: 40%
  Repeat 4 times:
    R1 cutoff: 5
    R2 cutoff: 2
  Repeat 3 times:
    R1 cutoff: 5
    R2 cutoff: -1

So the parameters would be
  xsize ysize 40  5 2 4  5 -1 3

--
CalcRogue: TI-89, TI-92+, PalmOS, Windows and Linux.
http://calcrogue.jimrandomh.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jimrandomh  
View profile  
 More options Jul 25 2005, 10:20 pm
Newsgroups: rec.games.roguelike.development
From: jimrandomh <usenetNOS...@jimrandomh.org>
Date: Tue, 26 Jul 2005 02:20:07 GMT
Local: Mon, Jul 25 2005 10:20 pm
Subject: Re: Cellular Automata
The Sheep <thesheep@ sheep.prv.pl> wrote:

>  jimrandomh wrote:
>> "Verdagon" <Verda...@gmail.com> wrote:
>>> Can anyone explain this to me? Thanks!

>> The page you referenced is unreachable (invalid domain name), but
>> that rule sounds like what I described in this article:
>>   http://www.jimrandomh.org/misc/caves.html

> Would you agree to put it on roguebasin?

Of course.

--
CalcRogue: TI-89, TI-92+, PalmOS, Windows and Linux.
http://calcrogue.jimrandomh.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Severian  
View profile  
 More options Jul 26 2005, 3:40 am
Newsgroups: rec.games.roguelike.development
From: "Severian" <edemp...@gmail.com>
Date: 26 Jul 2005 00:40:34 -0700
Local: Tues, Jul 26 2005 3:40 am
Subject: Re: Cellular Automata
Your algo is great!!! have been playing with it this week-end and found
some other parameters wich could be interesting:

Wormholes 1 or 2 tiles wide:
   xsize ysize 45  5 2 10  5 -1 10 5 2 1

Wormholes 2 tiles wide (sometimes with rooms):
   xsize ysize 45  5 2 10  5 -1 10 5 2 1

Some others:
   xsize ysize 45  5 0 5 5 1 1
   xsize ysize 45  5 -1 5 5 1 1

It can be interesting to include the pseudo-random seed as a parameter,
so you can see R1 and R2 effects on the same pattern.

Do you mind if I use it in my roguelike ?

-----------
Severian
Plasma Roguelike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
The Sheep  
View profile  
 More options Jul 26 2005, 4:54 am
Newsgroups: rec.games.roguelike.development
From: The Sheep <thesheep@ sheep.prv.pl>
Date: Tue, 26 Jul 2005 08:54:17 +0000 (UTC)
Local: Tues, Jul 26 2005 4:54 am
Subject: Re: Cellular Automata
At Tue, 26 Jul 2005 02:20:07 GMT,

 jimrandomh wrote:
> The Sheep <thesheep@ sheep.prv.pl> wrote:
>>  jimrandomh wrote:
>>> "Verdagon" <Verda...@gmail.com> wrote:
>>>> Can anyone explain this to me? Thanks!
>>> The page you referenced is unreachable (invalid domain name), but
>>> that rule sounds like what I described in this article:
>>>   http://www.jimrandomh.org/misc/caves.html
>> Would you agree to put it on roguebasin?
> Of course.

Great! I'll add it asap, but...

It seems to be down at the moment?

--
 Radomir `The Sheep' Dopieralski    @**@_
                                    (Qq) 3  Sob?
                     .   .  . ..v.vVvVVvVvv.v.. .


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shawn Moore  
View profile  
 More options Jul 26 2005, 6:55 am
Newsgroups: rec.games.roguelike.development
From: "Shawn Moore" <sar...@gmail.com>
Date: 26 Jul 2005 03:55:13 -0700
Local: Tues, Jul 26 2005 6:55 am
Subject: Re: Cellular Automata

> Do you mind if I use it in my roguelike ?

You still have the problem of getting rid of disjoint regions. How do
you plan on tackling that?

I've implemented this nifty generator in my roguelike (I liked the
looks of the samples and I didn't want to emulate NetHack with rooms
and tunnels.. what kind of a _dungon_ has those?) and my current plan
is to have the upstairs and downstairs be in the biggest region, and
allow the smaller disjoint regions to exist.. maybe give the player a
pickaxe and put some treasure in them. Heh. Any other ideas?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Severian  
View profile  
 More options Jul 26 2005, 8:07 am
Newsgroups: rec.games.roguelike.development
From: "Severian" <edemp...@gmail.com>
Date: 26 Jul 2005 05:07:23 -0700
Local: Tues, Jul 26 2005 8:07 am
Subject: Re: Cellular Automata

> You still have the problem of getting rid of disjoint regions. How do
> you plan on tackling that?

Giving a pickaxe was my idea too :) and choosing entrance and exit in
the same region (by pathfinding them), at least at the first levels.

Another idea: you could create a living dungeon, just by generating -
let us say, every 50 rounds - a new cycle for the map, and coming
backward then, like if it was 'pulsating'. Don't know if I am clear...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gerry Quinn  
View profile  
 More options Jul 26 2005, 9:20 am
Newsgroups: rec.games.roguelike.development
From: Gerry Quinn <ger...@DELETETHISindigo.ie>
Date: Tue, 26 Jul 2005 14:20:22 +0100
Local: Tues, Jul 26 2005 9:20 am
Subject: Re: Cellular Automata
In article <1122311243.766395.306...@g49g2000cwa.googlegroups.com>,
Verda...@gmail.com says...

It fills up the middle of any big empty space, but not the edge.  So
the maze stays connected even though a lot more of it is getting filled
up.

- Gerry Quinn


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Verdagon  
View profile  
 More options Jul 26 2005, 5:35 pm
Newsgroups: rec.games.roguelike.development
From: "Verdagon" <Verda...@gmail.com>
Date: 26 Jul 2005 14:35:22 -0700
Local: Tues, Jul 26 2005 5:35 pm
Subject: Re: Cellular Automata
In my map, I have three variables per tile: Char, Color, and
Attributes. Attributes are used later, for walkable and stuff, but
thats after the map generation. So I thought, why not use them now?
Here's what I do:

Use this Attributes variable to store the "region" variable that the
tile is in. That tile and the ones connected to it, and the ones
connected to those, etc. will all be in the same region. You would have
a few different regions across the map.

Start out with a Region variable as zero. Cycle through every tile on
the map, and when you hit a floor that is un-regioned (has no region),
set that to your Region variable. Then, start a "spreading" thing (kind
of like what A* uses) and take over all the adjacent un-regioned floor
tiles, and take over the ones next to those, etc. until theres no more
connected tiles to spread to. Increment the Region variable. Then
continue cycling through the map, looking for more un-regioned tiles
and do the same process. Soon, every floor tile on the map will have a
region.

If there's only one region, youre done. If not, keep reading. Find a
tile of one region, and a tile of another. Then, make a path of floor
tiles from one to the other. When they meet, make all their region
variables the same, so they're combined. Keep making paths until it's
all connected.

I'm not that good at explaining code, but you probably get the general
idea. This method worked great for me, and with a little tweaks, the
connections between regions could look like caves themselves.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
The Sheep  
View profile  
 More options Jul 26 2005, 6:45 pm
Newsgroups: rec.games.roguelike.development
From: The Sheep <thesheep@ sheep.prv.pl>
Date: Tue, 26 Jul 2005 22:45:56 +0000 (UTC)
Local: Tues, Jul 26 2005 6:45 pm
Subject: Re: Cellular Automata
At 26 Jul 2005 03:55:13 -0700,
 Shawn  Moore wrote:

>> Do you mind if I use it in my roguelike ?

> You still have the problem of getting rid of disjoint regions. How do
> you plan on tackling that?

Just an untested idea, but how about this:

The cellular automaton preserves connectivity, so any disjoint regions
must come from the initial noise used to fill the map. The idea is to
use something different than just noise, to assure the connectivity before
applying the automaton filters.

For example, you could fill the map with solid rock and carve some empty
spaces using several random walks (you can ensure they are all connected
by starting all of them but the first one on an empty cell), until you get
the desired percentage of empty cells.

--
 Radomir `The Sheep' Dopieralski    @**@_
                                    (Xx) 3  ...
                     .   .  . ..v.vVvVVvVvv.v.. .


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Severian  
View profile  
 More options Jul 27 2005, 9:21 am
Newsgroups: rec.games.roguelike.development
From: "Severian" <edemp...@gmail.com>
Date: 27 Jul 2005 06:21:23 -0700
Local: Wed, Jul 27 2005 9:21 am
Subject: Re: Cellular Automata

> The cellular automaton preserves connectivity

Where do you get that ? The first rule says that if a floor has five
walls as neigbours, a wall will be created, so I guess it can close
areas.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
The Sheep  
View profile  
 More options Jul 28 2005, 2:31 pm
Newsgroups: rec.games.roguelike.development
From: The Sheep <thesheep@ sheep.prv.pl>
Date: Thu, 28 Jul 2005 18:31:23 +0000 (UTC)
Local: Thurs, Jul 28 2005 2:31 pm
Subject: Re: Cellular Automata
At 27 Jul 2005 06:21:23 -0700,

 Severian wrote:
>> The cellular automaton preserves connectivity

> Where do you get that ? The first rule says that if a floor has five
> walls as neigbours, a wall will be created, so I guess it can close
> areas.

Right, no idea where it came from :( Sorry.

--
 Radomir `The Sheep' Dopieralski    @**@_
                                    (Xx) 3  ...
                     .   .  . ..v.vVvVVvVvv.v.. .


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Severian  
View profile  
 More options Jul 28 2005, 6:01 pm
Newsgroups: rec.games.roguelike.development
From: "Severian" <edemp...@gmail.com>
Date: 28 Jul 2005 15:01:21 -0700
Local: Thurs, Jul 28 2005 6:01 pm
Subject: Re: Cellular Automata
Actually I tried your idea wich look very promising, then realised that
closed areas could appear from open ones.

Nevertheless your idea was good indead: if we find an algorithm that
preserves connectivity, then an open area map will always be
transformed into another open area. It looks like a mathematical
function :)

We are sure some transformations preserve connectivity:
- when it only removes walls
- when it adds a wall where there are neighbour walls only on one side
- or, said in another way, when it does not connect on side with
another- ; for instance:

#..  ###  ..#  ...  ##.      ##.      ###      ###      ###      ###
#X.  .X.  .X#  .X.  #X. (x4) #X. (x4) #X. (x4) #X. (x4) #X. (x4) #X#
#..  ...  ..#  ###  #..      ##.      #..      ##.      ###      ###

(actually the last one should not appear)
(x4 means you can repeat the pattern in the 4 directions)

Another idea, perhaps we can look into Mandelbrot fractal and Julia
graphs: for each complex point of Mandelbrot there is a Julia graph
associated, and if the point is INSIDE mandelbrot figure, then the
julia graph associated will be in only one piece.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Verdagon  
View profile  
 More options Jul 28 2005, 9:56 pm
Newsgroups: rec.games.roguelike.development
From: "Verdagon" <Verda...@gmail.com>
Date: 28 Jul 2005 18:56:52 -0700
Local: Thurs, Jul 28 2005 9:56 pm
Subject: Re: Cellular Automata
Wait, what's this about mandelbrot?

Is it better than cellular automata?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Severian  
View profile  
 More options Jul 29 2005, 7:45 am
Newsgroups: rec.games.roguelike.development
From: "Severian" <edemp...@gmail.com>
Date: 29 Jul 2005 04:45:10 -0700
Local: Fri, Jul 29 2005 7:45 am
Subject: Re: Cellular Automata
Julia sets are too regular for carving caves I guess.

Have a look there if you want to have more information about Julia
connectivity:

http://www.geocities.com/CapeCanaveral/2854/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Severian  
View profile  
 More options Jul 29 2005, 8:02 am
Newsgroups: rec.games.roguelike.development
From: "Severian" <edemp...@gmail.com>
Date: 29 Jul 2005 05:02:09 -0700
Local: Fri, Jul 29 2005 8:02 am
Subject: Re: Cellular Automata
Let's try not to reinvent the wheel :)

I found this Angband patch creating fractal caves from midplacement
algorithm; it seems to have a way to connect areas together:
http://public.www.planetmirror.com/pub/angband/Patch/sfpatch4.tar.gz


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google