ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Bellman

For scripts to aid with computation or simulation in cellular automata.

Re: Bellman

Postby dvgrn » December 1st, 2018, 10:02 am

Entity Valkyrie wrote:
Entity Valkyrie wrote:But I still can't use bellman!!!


WHY DID NOBODY REPLY ME???

Please don't yell. Nobody replied because you didn't ask any questions, and didn't provide any information. That's your half of the work, and if you don't do it, nobody else is likely to do their half either.

Try to be as clear and specific as you can in answering Rhombic's question, and you're likely to get much better results.
User avatar
dvgrn
Moderator
 
Posts: 4984
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Bellman

Postby Entity Valkyrie » December 2nd, 2018, 5:50 am

dvgrn wrote:
Entity Valkyrie wrote:
Entity Valkyrie wrote:But I still can't use bellman!!!


WHY DID NOBODY REPLY ME???

No need to yell. Nobody replied because you didn't ask any questions, and didn't provide any information. That's your half of the work, and if you don't do it, nobody else is likely to do their half either.

Try to be as clear and specific as you can in answering Rhombic's question, and you're likely to get much better results.


I tried to use bellman, but it crashed/auto-shut immediately after I opened it. Can anyone fix this problem?
User avatar
Entity Valkyrie
 
Posts: 189
Joined: November 30th, 2017, 3:30 am

Re: Bellman

Postby dvgrn » December 2nd, 2018, 7:25 am

Entity Valkyrie wrote:
dvgrn wrote:Try to be as clear and specific as you can in answering Rhombic's question, and you're likely to get much better results.


I tried to use bellman, but it crashed/auto-shut immediately after I opened it. Can anyone fix this problem?

Probably not. Unfortunately you still haven't provided any actual useful details.

When you say "Bellman", nobody except for you knows what that means. There are several ZIP files you could have downloaded with different versions of Bellman, with or without executable files.

In general, when you're asking for this kind of help, start by mentioning your operating system, and the exact name of the files you downloaded, with the link where you downloaded them. If you don't walk a potential helper through every single one of the exact steps that you took to get to your problem, then nobody can duplicate the problem, and that means that no one can help you.

Possibilities
If you're just trying to run someone else's pre-compiled Windows executable instead of compiling the program yourself, there are two possibilities at least:

1) If you don't know how to use a Cygwin command line, and if instead of reading and following the instructions, you're just double-clicking Bellman.exe and hoping... you would probably get behavior more or less like what you're describing. Is that what you're doing? Again, please be painfully detailed and specific about each individual step that you're attempting.

2) If you're calling a precompiled Bellman.exe correctly from a command line, by typing something like

time ./bellman inputs/test.in


and if it's crashing immediately in that context, then you should probably give up on that executable. Maybe you could try running in some Windows compatibility mode, but you'd be on your own experimenting with that -- I don't think it's likely to work. Precompiled executables are great when they work, but hopeless if your hardware or operating system is incompatible with the hardware used to do the compiling.

For example, if you're trying to run, in Windows, the Linux executable provided with simeks' fork of BellmanWin... that seems very unlikely to work out well for you. But until you explain specifically what you're doing, no one will be able to guess if that's your problem.

Cygwin Is A Good Place To Start
On Windows, it's probably better in general to start by installing Cygwin, getting your code from a repository like the one linked above, and learning how to compile it. Git and gcc (and Cygwin) take some getting used to, for sure. Maybe start with something simple like apgsearch, if you haven't done that already. The instructions are all in the README. If you can get that working, then maybe it will make sense to try compiling Bellman using the same tools.

Rhombic wrote:Can you say what you have done and what error appears?
Go on cygwin, move to the folder with your Bellman and do this:
gcc bellman.c bitwise.h evolve_bitwise.c evolve_simple.c lib.c lib.h readfile.c readwrite.h textconv.c universe.c universe.h writefile.c -o bellman;
gcc evolve_bitwise.c evolve_simple.c findstill.c lib.c lib.h mkstill.c readfile.c readwrite.h textconv.c universe.c universe.h writefile.c -o mkstill

After that, just to be absolutely clear, you should end up with new "bellman" and "mkstill" executables that you didn't have before.

If you're still having problems, then whatever text appears on the screen after you try the above, you should copy and paste it to a message here, and mention anything else you saw or did along the way that might be relevant.
User avatar
dvgrn
Moderator
 
Posts: 4984
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Bellman

Postby Rhombic » December 3rd, 2018, 2:48 pm

simeks wrote:
Rhombic wrote:I have marked all additions with " // CXI " and the part that I need help with with "HELP".

I made an attempt with this. It isn't very efficient, but I think it might work.
Would you do some tests and check if it does what you expect it to do?

Note: on line 791 I changed
if((first_active_gen > 0) && (ge->gen > first_active_gen + inhabit_gen)) { //CXI
to
if((first_active_gen > 0) && (ge->gen >= inhabit_gen)) { //CXI

I think that is what you meant, but I'm not sure...


I am not entirely sure how to use it, let's say I had the following case where the bounding box with two padded cells would represent the Bellman input [x+2,y+2]:
x = 21, y = 18, rule = LifeHistory
$5.2A$6.2A7.5D$7.2A6.5D$15.5D$15.5D$15.5D$.19B$.19B$.19B$.19B$.19B$.
19B$.19B$.19B$.19B$.19B!
It doesn't matter that it would need more empty rows on the top, just bear with me.

State 2 is where you want the catalyst to be.
State 4 is the area where you want between inhabit_min and inhabit_max cells alive in generation inhabit_gen.

Actually, it would probably be easier if we did it with states like this instead of by defining the bounding rectangle in the parameters.

In any case, the parameters in this case would be inhabit-x = 16, inhabit-y = 2, inhabit-wx = 4, inhabit-wy = 4.
At generation inhabit-gen, it checks that the population of that rectangle (or the total live cells within the specified cells) is between inhabit-min and inhabit-max.
SoL : FreeElectronics : DeadlyEnemies : 6a-ite
what is “sesame oil”?
User avatar
Rhombic
 
Posts: 1004
Joined: June 1st, 2013, 5:41 pm

Re: Bellman

Postby simeks » December 3rd, 2018, 6:06 pm

Rhombic wrote:I am not entirely sure how to use it, let's say I had the following case where the bounding box with two padded cells would represent the Bellman input [x+2,y+2]:

Actually it's a good tip to always try to keep the evolving pattern within the first tile, which is 0-63 in both directions. If a pattern evolves into a neighbouring tile it slows the search down a lot.

If I move your example to the center of the first tile it would be like this, where I put a white cell to just to indicate the [0, 0] cell:

x = 45, y = 47, rule = LifeHistory
C31$30.2A$31.2A7.5D$32.2A6.5D$40.5D$40.5D$40.5D$26.19B$26.19B$26.19B$
26.19B$26.19B$26.19B$26.19B$26.19B$26.19B$26.19B!

That would mean inhabit-x = 40, inhabit-y = 32
I took inhabit-wx and inhabit-wy to mean width, so they should be 5, not 4.

Also, as written now, the population in the inhabit square will be checked at every generation, starting at inhabit-gen. If that's not how you wanted it, just change >= to == on line 791 (double equal sign).
simeks
 
Posts: 364
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Re: Bellman

Postby Rhombic » December 5th, 2018, 9:23 am

simeks wrote:
Rhombic wrote:I am not entirely sure how to use it, let's say I had the following case where the bounding box with two padded cells would represent the Bellman input [x+2,y+2]:

Actually it's a good tip to always try to keep the evolving pattern within the first tile, which is 0-63 in both directions. If a pattern evolves into a neighbouring tile it slows the search down a lot.

If I move your example to the center of the first tile it would be like this, where I put a white cell to just to indicate the [0, 0] cell:

x = 45, y = 47, rule = LifeHistory
C31$30.2A$31.2A7.5D$32.2A6.5D$40.5D$40.5D$40.5D$26.19B$26.19B$26.19B$
26.19B$26.19B$26.19B$26.19B$26.19B$26.19B$26.19B!

That would mean inhabit-x = 40, inhabit-y = 32
I took inhabit-wx and inhabit-wy to mean width, so they should be 5, not 4.

Also, as written now, the population in the inhabit square will be checked at every generation, starting at inhabit-gen. If that's not how you wanted it, just change >= to == on line 791 (double equal sign).


I see! Very useful. However, Why does it give this as a valid result?
#S first-encounter 1
#S last-encounter 80
#S repair-interval 20
#S inhabit-x 35
#S inhabit-y 2
#S inhabit-gen 35
#S inhabit-wx 22
#S inhabit-wy 43
#S inhabit-min 1
#S inhabit-max 100
#S stable-interval 10
#S max-live 60
#S max-active 8
#P 0 0
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
.............@.@................................................
................@...............................................
................@...............................................
.............@..@...............................................
..............@@@...............................................
................................................................
................................................................
................................................................
..............**................................................
........?.**..**..*????.........................................
.......??*.*.......??????.......................................
.......??*.....????????????.....................................
.......???....??????????????....................................
.......???????????????????????..................................
.......????????????????????????.................................
.......?????????????????????????................................
.......?????????????????????????................................
.......?????????????????????????................................
........?????????????????????????...............................
........?????????????????????????...............................
.........????????????????????????...............................
.........????????????????????????...............................
..........???????????????????????...............................
..........???????????????????????...............................
..........???????????????????????...............................
...........??????????????????????...............................
............?????????????????????...............................
.............????????????????????...............................
...............??????????????????...............................
.................???????????????................................
...................?????????????................................
......................??????????................................
.........................??????.................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
SoL : FreeElectronics : DeadlyEnemies : 6a-ite
what is “sesame oil”?
User avatar
Rhombic
 
Posts: 1004
Joined: June 1st, 2013, 5:41 pm

Re: Bellman

Postby simeks » December 5th, 2018, 11:48 am

Rhombic wrote:However, Why does it give this as a valid result?

Because the solution is accepted at generation 18 once the catalysts have been restored and then stable for (stable-interval = 10) generations.
With your search parameters the check of the population doesn't start until generation 35, so that never happens.
simeks
 
Posts: 364
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Re: Bellman

Postby Rhombic » December 6th, 2018, 6:49 am

simeks wrote:
Rhombic wrote:However, Why does it give this as a valid result?

Because the solution is accepted at generation 18 once the catalysts have been restored and then stable for (stable-interval = 10) generations.
With your search parameters the check of the population doesn't start until generation 35, so that never happens.

This would mean setting inhabit-gen to 1 should check every generation. However, when I use it, it only checks about 800 catalysts and halts, which makes me think it's expecting more than one cell to be alive in the region in every generation after gen 1, not in at least one. Is this correct, and if so, how can I change it?
SoL : FreeElectronics : DeadlyEnemies : 6a-ite
what is “sesame oil”?
User avatar
Rhombic
 
Posts: 1004
Joined: June 1st, 2013, 5:41 pm

Re: Bellman

Postby simeks » December 10th, 2018, 6:14 pm

Rhombic wrote:This would mean setting inhabit-gen to 1 should check every generation. However, when I use it, it only checks about 800 catalysts and halts, which makes me think it's expecting more than one cell to be alive in the region in every generation after gen 1, not in at least one. Is this correct, and if so, how can I change it?

Yes, it checks for more than one cell in every generation...
As I wrote a few posts back if you want the population to be checked in just one single generation, change >= to == on line 791 (double equal sign).

In your example search, you'll have to change stable-interval to a value big enough so that the search will always reach generation = inhabit-gen before accepting a solution. Setting stable-interval = inhabit-gen should do it, but it could be slightly less depending on other search parameters.
simeks
 
Posts: 364
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Previous

Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest