Google Groups Home
Help | Sign in
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
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
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