R2INT (CA simulator programming/discussion)

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

R2INT (CA simulator programming/discussion)

Post by R2INT »

GitHub repository

This is R2INT, my CA simulator written to natively simulate Range-2 Moore INT rules. There is still lots of work that needs to be done to make the program useful, including:
  • Custom Rule Simulation: Currently simulates CGoL, with a Rule Editor to modify individual R2INT transitions:

    Code: Select all

    #C The theme used here is an approximation of the default theme I plan to use in R2INT
    #R B3/S23
    !
    # [[ RANDWIDTH 100 RANDHEIGHT 100 RANDOMIZE COLOR ALIVE 64 255 160 COLOR ALIVERAMP 255 255 255 COLOR DEAD 0 160 0 COLOR DEADRAMP 0 32 0 AGESTATES 24 HISTORYSTATES 24 THUMBNAIL ]]
  • Pattern Editing, Importing and Exporting: Importing and exporting are not yet implemented. In-app editing has been implemented.
  • Infinite Grid: R2INT runs on an unbounded grid based on 64x64 chunks.
  • Notation: I have plans to make a notation for Range-2 INT rules. It is currently not fully developed yet. Here are some example transitions:

    Code: Select all

    x = 5, y = 21, rule = 012345678//4
    CB3C$BC2BC$2BA2C$5B$C4B4$C2B2C$B4C$BCA2C$B2C2B$2CBCB4$3CBC$2B2CB$BC.2B
    $C4B$CBC2B!
    # [[ COLOR ALIVE 255 255 255 COLOR DYING 0 255 128 COLOR DYINGRAMP 0 160 0 ]]
    # [[ LABEL 1 6 12 "S15gkgabaa" LABEL 1 14 12 "S10bceehjb" LABEL 1 22 12 "B14eagcdah" ]]
    #C STANDARD: Rotate CCW from canonical position (the one that gives the lowest number when read from top to bottom and left to right) for 0-3, then flip horizontally for 4-7
    Though 7-letter-per-transition notation seems pretty scary, I am actually using a systematic approach here that does not require a transition table. It is possible to make a similar notation with only 5 letters per transition, but that would likely require a massive transition table with arbitrary lettering.
  • *.r2int File Loading: The OCA community created a system for encoding Range-2 INT rules:
    islptng wrote: November 28th, 2024, 2:38 am
Let me know if you have any feature suggestions or bug reports for this CA simulator!
Last edited by R2INT on August 17th, 2025, 5:26 pm, edited 2 times in total.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: R2INT (CA simulator programming/discussion)

Post by confocaloid »

The topic is interesting, I would be interested to see what is possible, but there are also some interesting unanswered questions and I'm also a bit skeptical on some points.
R2INT wrote: April 3rd, 2025, 8:48 pm [...] I have plans to make a notation for Range-2 INT rules. [...]
One open question here is, what is/are the intended purpose(s) of the notation? A notation can have different purposes / can be useful in several different ways. What would make sense depends on the purpose(s).

Here is some relevant counting:
  • Forgetting about symmetries, there are 2^24 two-state 5-by-5 neighbourhood configurations omitting the middle cell's state (to specify any one of them, one needs to specify states of the 24 cells marked as LifeHistory state 2 below):

    Code: Select all

    x = 5, y = 5, rule = LifeHistory
    5B$5B$2BF2B$5B$5B!
    #C [[ GRID ]]
    
  • Out of those 2^24 neighbourhood configurations omitting the middle cell's state, 2^6 remain unchanged when rotated 90 degrees clockwise, and 2^6 remain unchanged when rotated 90 degrees counterclockwise (it suffices to specify states of the six cells marked as LifeHistory state 2 below):

    Code: Select all

    x = 7, y = 7, rule = LifeHistory
    7F$F3B2.F$F3B2.F$F2.F2.F$F5.F$F5.F$7F!
    #C [[ GRID ]]
    
  • 2^12 neighbourhood configurations omitting the middle cell's state remain unchanged when rotated 180 degrees:

    Code: Select all

    x = 7, y = 7, rule = LifeHistory
    7F$F5BF$F5BF$F2BF2.F$F5.F$F5.F$7F!
    #C [[ GRID ]]
    
  • 2^14 neighbourhood configurations omitting the middle cell's state remain unchanged when mirrored vertically:

    Code: Select all

    x = 7, y = 7, rule = LifeHistory
    7F$F5BF$F5BF$F2BF2BF$F5.F$F5.F$7F!
    #C [[ GRID ]]
    
    and of course the count is the same for horizontal mirroring.
  • 2^14 neighbourhood configurations omitting the middle cell's state remain unchanged when mirrored through the main diagonal:

    Code: Select all

    x = 7, y = 7, rule = LifeHistory
    7F$F5BF$F.4BF$F2.F2BF$F3.2BF$F4.BF$7F!
    #C [[ GRID ]]
    
    and of course the count is the same for mirroring through the other diagonal.
  • It follows that there are precisely

    Code: Select all

    2105872 = 1/8 (2^24 + 2^6 + 2^6 + 2^12 + 2^14 + 2^14 + 2^14 + 2^14)
    
    cell conditions, omitting the cell's own state. In other words, there are 2105872 equivalence classes of neighbourhood configurations omitting the middle cell's state (up to rotations and reflections, because the discussion is about isotropic cellular automata).
Is the above counting correct? (which is b.t.w. a question to everyone interested in the CA family "two-state isotropic cellular automata with range-2 Moore neighbourhood")

Assuming it is correct, one would need at least twice as many bits of information to be able to pick an arbitrary CA from this family. (That doesn't mean one would always need that many bits. One might choose to simplify representation for some subspaces/subsets.) Specifically, one would need 2105872 bits to specify which cell conditions omitting the cell's own state are included in the set of birth conditions (that is, to specify what are the birth rules and what are the nonbirth rules), and one would need 2105872 more bits to specify which cell conditions omitting the cell's own state are included in the set of survival conditions (that is, to specify what are the survival rules and what are the death rules).

That means roughly half a megabyte (526468 bytes) assuming naive uncompressed encoding, and slightly over 700000 characters assuming base-64 encoding.

Of course any human-readable notation is going to be much longer.

Speaking here for myself, it seems like a notation with multiple assigned letters needed to specify just one cell condition is going to be a non-starter.

I don't see how it would help with intuitive understanding, considering it's reasonable to expect hundreds of thousands (if not millions) of characters in many cases. In terms of being unreadable, I think that's going to overshadow anything that already exists, making RuleLoader ruletrees and weighted neighbourhood based CA definitions look very intuitive and human-readable in comparison.

I don't see how it would help with "bookmarking", it is probably going to be way way too long to serve as a bookmark. It would be simpler to assign autogenerated sequential labels/names and maintain a table of investigated CA.

As far as enforcing self-consistency goes, it would suffice to have roughly half a megabyte (526468 bytes) of raw data, possibly compressed and/or encoded as base64 for storage/transmission.

confocaloid wrote: February 5th, 2025, 5:46 am
Yoel wrote: February 5th, 2025, 3:57 am
confocaloid wrote: February 4th, 2025, 11:07 pm Probably that would run again into the question "what is the purpose of the notation?" [...]
What I have suggested is still readable for a user who has some experience. [...]
A notation can have different purposes / can be useful in several different ways.
  • (Enforcing self-consistency) For "restricted" families of cellular automata (such as your cyclical CA, or self-complementary two-state CA), it can be helpful to have a dedicated notation, because that allows the user of the notation to "forget" the exact constraints/restrictions on the ruleset. (The script used to parse the notation will correctly generate a consistent ruleset satisfying the restrictions.) A notation can be useful when it correctly captures inherent symmetries or repetition.
    (By "restricted" I mean here any restrictions of the following general form:

    Code: Select all

    "either ALL of these birth/survival/mutation/... rules must be in the ruleset,
    or NEITHER of these birth/survival/mutation/... rules can be in the ruleset"
    For self-complementary two-state CA, those restrictions are that every birth rule implies the corresponding death rule and vice versa, and every survival rule implies the corresponding "abstain" (non-birth) rule and vice versa.)
  • (Intuitive understanding) Another way how a notation can be useful, if it helps to "read and understand" the definition. This doesn't directly follow from ensuring self-consistency. A notation can guarantee self-consistency and still be obscure. For comparison:
    • Hensel notation can be learned, but it takes time and efforts (and I still can't remember the exact meanings of 3q/3n/3r).
    • Weighted neighbourhoods can lead to long rulestrings, but they can have advantages both in terms of guaranteeing consistency ("R1,NW151505151" captures restrictions that would otherwise be hard to describe with Hensel notation) and in terms of human-readability (fewer arbitrarily assigned letters that would require a table to interpret).
  • (Bookmarking) Another way how a notation might be helpful, if it makes it possible to "save" or "share" interesting rulesets quickly (by copying a single string, rather than an entire file). This doesn't have to be human-readable, and doesn't have to guarantee self-consistency - it's simply sort of a way to "bookmark" an interesting ruleset.
  • ...
[...]
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
User avatar
islptng
Posts: 495
Joined: May 24th, 2024, 6:17 am
Location: 种花家

Re: R2INT (CA simulator programming/discussion)

Post by islptng »

Some changes to .r2int table that I wasn't able to make:

1.Disabling:
Add a tilde(~) to the end of a transition to show that this should not be alive in the next generation.

2.Same:
An uppercase letter means "this cell is the same as that".

Code: Select all

Y Z J K L
W I B C M
V H A D N 
U G F E O
T S R Q P
For example,
xAAAAAAAAAAAAAAAAAAAAAAAA~
means "No B0 or S24".
My sandbox | All my engineered replicators | BsKngt | TNT
Asperger, ISTP, using a Dvorak keyboard.

I love my new school life.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

islptng wrote: April 4th, 2025, 9:02 pm Some changes to .r2int table that I wasn't able to make:
[...]
That's good to know!

Anyways:
R2INT's Rule Editor is working now!
A screenshot of the R2INT Rule Editor
A screenshot of the R2INT Rule Editor
R2INT_Rule_Editor.png (49.99 KiB) Viewed 2677 times
  • To access the Rule Editor, click the text that says 'Open Rule Editor' at the top of the screen.
  • The 5x5 grid at the left of the Rule Editor contains the configuration of cells, including the center cell, representing the transition being edited. Clicking on any of the cells in the grid will toggle them between on and off.
  • The large cell to the right is what the center cell in the 5x5 grid transitions into. Clicking on it will toggle it between on and off.
The GUI for the Rule Editor is not finished yet. I still have to add an arrow to show what the center cell of the 5x5 grid becomes.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: R2INT (CA simulator programming/discussion)

Post by confocaloid »

R2INT wrote: April 11th, 2025, 3:45 pm The large cell to the right is what the center cell in the 5x5 grid transitions into. Clicking on it will toggle it between on and off.

The GUI for the Rule Editor is not finished yet. I still have to add an arrow to show what the center cell of the 5x5 grid becomes.
An "arrow" may be more-or-less optional. Instead or in addition to an "arrow", I would highlight the middle cell of the 5-by-5 neighbourhood configuration shown on the left in some way. For example one could use two colours visibly different from those used for neighbours of the cell, or one could add a visible border around the middle cell.

Just looking at the picture, it is not completely clear how it is supposed to work (what would be possible user interactions and consequences of those interactions).

I would make all 26 cells clickable (one cell in the next generation and 25 cells in the current generation).
  • If the user changes the "condition" part of the rule (the neighbourhood configuration shown on the left), the program would load the matching "if-then" rule and automatically update the displayed "future of the middle cell" to what is currently prescribed.
  • If the user changes the "future" part of the rule (clicks on the cell shown on the right), then the matching rule is discarded and a replacement rule is added instead.
This doesn't tell what is the equivalence relation on the set of all possible neighbourhood configurations. The same UI and the same approach could work for arbitrary two-state CA with range-2 Moore neighbourhood, or it could work for two-state outer-totalistic CA with the same neighbourhood, or it could work for two-state isotropic CA with the same neighbourhood, depending on how "find the matching rule" is interpreted.

Linking some earlier work in the same direction:
https://web.archive.org/web/20040323172 ... ndixA.html
Appendix A: CAEditor wrote: [...]
Advancing to the next iteration, the cellular space area will display two identical copies of the initial configuration: since no transition rules have been specified, the program assumes that all elements will remain in the same state.

The user can now begin to modify the next state display to obtain the desired behavior: selecting a state and clicking on an element in the display (again, the zoom might be useful) will cause a new transition rule to appear in the rule area. An attempt to add the rule will then undoubtedly succeed, since no conflict can be generated (no other rule is present).

As soon as the rule is added to the transition table, the cellular space area is updated to reflect the change, displaying the updated present and next states. The user can then keep inserting additional rules, and the program will automatically assure that no conflict exists.

Once the first iteration has been completely defined, the user can advance to the next, add the rules necessary to implement the desired behavior, and so on. The user can thus iteratively define the states of the automaton until the transition table has been completely defined.

A.1.3 The Rule Editor
In certain cases, and notably if a set of rules is known to be correct, it might be desirable to insert the rules directly, without going through the graphical interface and the verification process.

To this end, we introduced a sub-program, known as the rule editor, which allows the list of transition rules to be accessed directly: the user can than add, remove or find rules directly from the list without going through the "standard" process.

The rule editor is a powerful but "dangerous" tool, as it allows rules to be added and discarded without considering the effect of such operations on the automaton: there is no guarantee that no conflicts will be generated or that all necessary rules will be preserved.

Also accessible through the rule editor is the cleanup feature. When this process is activated, the program will analyze all the current transition rules and discard all those which are either covered (i.e., superseded by other rules) or redundant. In the process of designing of complex automata, such rules are anything but rare, often a consequence of run-time modifications to the behavior of the automaton.
Last edited by confocaloid on April 11th, 2025, 8:06 pm, edited 1 time in total.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

confocaloid wrote: April 11th, 2025, 7:55 pm [...]I would highlight the middle cell of the 5-by-5 neighbourhood configuration shown on the left in some way. For example one could use two colours visibly different from those used for neighbours of the cell, or one could add a visible border around the middle cell.
[...]
Done:
R2INT_Rule_Editor.png
R2INT_Rule_Editor.png (29.93 KiB) Viewed 2658 times
confocaloid wrote: April 11th, 2025, 7:55 pm I would make all 26 cells clickable (one cell in the next generation and 25 cells in the current generation).
  • If the user changes the "condition" part of the rule (the neighbourhood configuration shown on the left), the program would load the matching "if-then" rule and automatically update the displayed "future of the middle cell" to what is currently prescribed.
  • If the user changes the "future" part of the rule (clicks on the cell shown on the right), then the matching rule is discarded and a replacement rule is added instead.
I already did.
confocaloid wrote: April 11th, 2025, 7:55 pm This doesn't tell what is the equivalence relation on the set of all possible neighbourhood configurations. The same UI and the same approach could work for arbitrary two-state CA with range-2 Moore neighbourhood, or it could work for two-state outer-totalistic CA with the same neighbourhood, or it could work for two-state isotropic CA with the same neighbourhood, depending on how "find the matching rule" is interpreted.
[...]
It is possible to determine, based on the program name (R2INT), that it works for 2-state isotropic CA.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: R2INT (CA simulator programming/discussion)

Post by confocaloid »

R2INT wrote: April 11th, 2025, 8:06 pm
confocaloid wrote: April 11th, 2025, 7:55 pm This doesn't tell what is the equivalence relation on the set of all possible neighbourhood configurations. [...]
It is possible to determine, based on the program name (R2INT), that it works for 2-state isotropic CA.
That's correct, and my point was simply that the same user interface (with the same user interactions) could be used for outer-totalistic CA and/or arbitrary two-state CA with the same neighbourhood.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

confocaloid wrote: April 11th, 2025, 8:08 pm [...]
That's correct, and my point was simply that the same user interface (with the same user interactions) could be used for outer-totalistic CA and/or arbitrary two-state CA with the same neighbourhood.
In the future, I plan to add other CA types. The same (or a similar) user interface will be used, and there will be text on the bottom discerning between the different rulespaces.

Also, I have implemented pattern editing and dragging!
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

A basic .r2int rule saving system has been implemented in R2INT. Here is an example file (that should emulate a spaced-out variant of Conway's Life, along with some other patterns):

Code: Select all

000000000000000101010000
000001000000000011100000
000001000000001010000000
000011000000000000000000
000000000000010101000000
000000000000010100010000
000000000000010001010000
000111000000000010000000
000111000000001010000000
000111000000001101000000
000100100000000000100000
100000000000000101000000
100000000000000100010000
100000000000000101010000
100010000000000000000000
100010000000000001000000
100010100000000000000000
100010100000000100010000
100011100000000000000000
100000000000010001000000
100000000000010101000000
100000000000010000010000
100000000000010100010000
100000000000010001010000
000101010000000000000000
000000000000010100000100
000000000000010001000100
100000000000010000000100
100000000000010100000100
100000000000010001000100
101000100000010101000000
010101010000001010101000
000000000001000100010000
000000000001000001010000
100000000001000000010000
100000000001000100010000
100000000001000001010000
000000000001000100000100
000000000001000001000100
001010101100010001000100
101010101100010001000100
Note that it does not attempt to 'compress' .r2int tables yet--currently, the table produced for Conway's Life would be over 100K lines long!
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

I’ve added a major new capability to R2INT: it can now simulate an infinite chunk-based grid!

Here’s a quick demonstration: a Gosper Glider Gun alongside a single glider in the same universe. The background colors are for debugging purposes and help visualize the chunk-based behavior:
Screenshot 2025-08-15 215530.png
Screenshot 2025-08-15 215530.png (25.13 KiB) Viewed 2543 times
There’s a small bug when painting outside the center grid — you can draw new cells, but erasing them isn’t working yet.
The small dot in the bottom-right corner is just me testing painting in other chunks.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
CARuler
Posts: 1347
Joined: July 30th, 2024, 5:38 pm
Location: A rule-verse in floor rule-verse of the CGOL skyscraper

Re: R2INT (CA simulator programming/discussion)

Post by CARuler »

R2INT wrote: April 12th, 2025, 7:34 pm

Note that it does not attempt to 'compress' .r2int tables yet--currently, the table produced for Conway's Life would be over 100K lines long!
use x like in the original .r2int system
how do i get it to work?
R2INT wrote: April 11th, 2025, 8:15 pm
confocaloid wrote: April 11th, 2025, 8:08 pm [...]
That's correct, and my point was simply that the same user interface (with the same user interactions) could be used for outer-totalistic CA and/or arbitrary two-state CA with the same neighbourhood.
In the future, I plan to add other CA types. The same (or a similar) user interface will be used, and there will be text on the bottom discerning between the different rulespaces.
other types like R3INT,R4INT,... ?
likes interesting rules
vist my rules here
also likes weird growth patterns in CA
hyperbolic CA!!!
ADHD user
mostly inactive
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

CARuler wrote: August 17th, 2025, 1:53 pm
R2INT wrote: April 12th, 2025, 7:34 pm

Note that it does not attempt to 'compress' .r2int tables yet--currently, the table produced for Conway's Life would be over 100K lines long!
use x like in the original .r2int system
how do i get it to work?
To save a rule you have golfed from R2INT, go to Edit Rule -> Save Rule (located at the bottom). When you save it, it should ask you for the file name in the command prompt (there is currently no UI for this) and then it should save to an R2INT file.
CARuler wrote: August 17th, 2025, 1:53 pm other types like R3INT,R4INT,... ?
R3INT takes too much memory for an optimized implementation (it represents it in a 5x5 grid of 25 cells, so 2^25 = 33,554,432 bits to store an R2INT rule. For R3INT, it requires 2^49 bits = 563 terabits (70TB); most people don't have that much RAM, and R4INT requires more memory than all of society uses). For this reason, R2INT focuses on other types of CA that also have large rulespaces. Here are some plans I have to implement such 2-state rulespaces (in the future) and their estimated memory requirement for R2INT:
  • Standard INT (64 B)
  • R2 Von Neumann INT (512 B)
  • R2 Circle Neighborhood INT (256 KiB)
  • R2 Moore INT (4 MiB)
  • R3 Octagon INT (64 MiB)

    Code: Select all

    ...o...
    .ooooo.
    .ooooo.
    ooooooo
    .ooooo.
    .ooooo.
    ...o...
    1D R1INT-R16INT (1B-1GiB)
  • 3D von Neumann INT (16 B)
  • 3D Edge Neighborhood (neighborhood where neighbors share an edge) (64 KiB)
    3D R2 von Neumann INT (4 MiB)
  • 3D Moore INT (8 MiB)
Also, the erasing bug has been fixed, so now you can erase cells from different grids.
Last edited by R2INT on August 17th, 2025, 3:53 pm, edited 1 time in total.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
CARuler
Posts: 1347
Joined: July 30th, 2024, 5:38 pm
Location: A rule-verse in floor rule-verse of the CGOL skyscraper

Re: R2INT (CA simulator programming/discussion)

Post by CARuler »

R2INT wrote: August 17th, 2025, 3:41 pm
CARuler wrote: August 17th, 2025, 1:53 pm use x like in the original .r2int system
how do i get it to work?
To save a rule you have golfed from R2INT, go to Edit Rule -> Save Rule (located at the bottom). When you save it, it should ask you for the file name (currently, it does not yet save to any file, it just prints to the command prompt)
but how do i open it in the first place?
likes interesting rules
vist my rules here
also likes weird growth patterns in CA
hyperbolic CA!!!
ADHD user
mostly inactive
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

CARuler wrote: August 17th, 2025, 3:53 pm [...]
but how do i open it in the first place?
To open R2INT, here's what you need to do:
  1. Clone R2INT from the GitHub repository

    Code: Select all

    git clone https://github.com/Numbers633/R2INT
  2. Open the project in Visual Studio (or your preferred C++ IDE).
  3. Set your compiler to C++17 (this is required for R2INT). In Visual Studio, right-click the project → Properties → C/C++ → Language → C++ Language Standard → ISO C++17.
  4. Link SFML libraries:
    • Go to Project Properties → Linker → General → Additional Library Directories and add the path to SFML lib folder.
    • Go to Linker → Input → Additional Dependencies and add the required .lib files (for example: sfml-graphics.lib, sfml-window.lib, sfml-system.lib).
  5. Build the project. If everything is set up correctly, it should compile without errors.
    Run R2INT from your IDE or open the compiled .exe in the Release folder.
If you encounter any issues, tell me your operating system and your compiler, and I can give more instructions for your setup.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
LuveelVoom
Posts: 529
Joined: April 27th, 2022, 7:59 pm

Re: R2INT (CA simulator programming/discussion)

Post by LuveelVoom »

Allow me to note that no range 1 von Neumann rule, INT or otherwise, in however many dimensions one chooses, can both escape its bounding box and shrink its bounding box.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

I have fixed a bug that causes B0 rules to expand endlessly. This means that rules with B0 should behave correctly (though there is an epilepsy warning, as this does not set the background to a fixed color). Also, I have removed the debug chunk colors.
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

I have updated R2INT's Rule Editor with two more features:
  1. New Settings Menu: A settings menu has been added to the Rule Editor (see screenshot below) to help keep the Rule Editor clean and organized. If I tried to add the next feature to the Rule Editor, there wouldn't be enough space for the button to fit.
  2. Loading Rules: Pressing 'Load' in the new Settings menu on the Rule Editor will ask you for a .r2int file. Currently, it does not support 'x' or 'ABC' yet.
R2INT_Rule_Editor_Settings4913.png
R2INT_Rule_Editor_Settings4913.png (80.3 KiB) Viewed 2407 times
The dark boxes are features that I plan to add in the future (though the ones near the bottom may take a while as they would be major features).

Let me know if you encounter any bugs!

EDIT: Text fonts planned for R2INT:

Code: Select all

#F x=3,y=3
#C 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz?!@#$%^&*()[]{}/\|.,;:'"`~
x = 345, y = 3, rule = B3/S23
bo2b2o2b2o2bobobobob3obo3b2o2b2o2b3o2bo2b2o2b2o2b2o2b3ob3ob2o2bobob3o
b3obobobo3b3obo3b3ob2o2b2o2b2o3b2ob3obobobobobobobobobobob2o6bo4bo3bo
2b3ob2o3b2obo5bo3bobo3bo14b2o2b2o11bo10bobo5bobo6b2o3bob3ob3obobobobo
2bo2b2o3b2o2bo2bo3b2o2b2o2b2ob2o4bobo4bo10bo2bo2bobobo2bo2bo$obo2bo4b
o2b2ob3ob2o2b2o3bo2b3ob3obobob3obo3bobob2o2b2o2b3ob3o2bo3bo2b2o2bo3b3o
b3obobobobob2o2b2o3bo3bo2bobobobob3o2bo2b3o2bo2b2o2b2o2bo3b2o2bobob2o
3b2ob3obo7b3obo2b3ob3ob2o2b2o2b2o2b2o3b2ob3obobobobob3ob3ob3ob2o4bo3b
ob3ob2o3bo6bobob2o3b2obo4bo2bo4bobo5bo2bo3bo3bo6bo9bobobo3bob3o$bo2b3o
b3obobo3bo2bo2b2o3bo3b2o3bob3ob2o2b3ob2o2b3obo3b3obobob3ob2o2bobob2o2b
obobobob3obo5bobobob2o3bo2b3o2bo2b3obobo2bo3b2ob3ob2o2b2o2b2o2b2o2bo3b
3obobobo3b2o3b2o2bob3obobob2o2bo4bo2bobob2o4bob3o2bo3bo2bobo3bo2b2obo
3bo3b3obobob2o2bobo5b3o6bo2bo3b2o2b2o2b2ob2o2bo5bo2bo2bo2bo3bo3bo14bo
!

Code: Select all

#F x=3,y=4
#C 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz?!@#$%^&*()[]{}/\|.,;:'"`~
x = 346, y = 4, rule = B3/S23
bo3bo2b2o2b3obobob3ob3ob3ob3ob3o2bo2b2o2b3ob2o2b3ob3ob3obobob3ob3obob
obo3b3obo3b3ob2o2b3ob2o2b2o2b3obobobobobobobobobobob2o6bo9bo6bo3b2obo
4bo3bo2bo3bo15b2o15bo27b2o2bo2b3o2bo3b2obo4bo2b2o2bobo2bo2bo3b2o2b2o2b
2ob2o4bobo4bo10bo2bo2bobobo2bo2bo$obob2o4bo2b2obobobo3bo5bobobobobobo
bob3obo3bobob2o2bo3bo3bobo2bo3bo2b2o2bo3b3ob3obobobobobobobobobo4bo2b
obobobob3o2bo2b3o2bo3b2ob2o3bo3b2ob3obo3bobobo11bobobo3b3ob2o2b3obobo
b2o2b2o3b2ob3obobobobobobobobob3ob2o4bo2bo2bobob3ob2o4bobobob2o3bo2bo
4bo2bo4bob2o3b2o2bo3bo3bo16bobobo3bob3o$obo2bo3bo4bo2b2o2b2ob3o3bob3o
b3ob3obobobo3bobobo3b2o2bobob3o2bo3bo2bobobo3b3obobobobob2o2b2o2b2o3b
o3bo2bobobobob3obobo2bo3bo2bobobobobo3bobobobob2o3b2ob2o3bo3bo2b2o2bo
3b3obobobobob2o2b2o2bobo2bo3bo2bobobobob3o2bo2b3o2bo10b3ob3o2b2o2bo6b
obobobobo4bo2bo4bo2bo3bo3bo3bo3bo6bo3bo17bo$bo2b3ob3ob3o3bob3ob3o3bob
3o3bobobob2o2b3ob2o2b3obo3b3obobob3ob2o2bobob3obobobobob3obo5bobobob2o
3bo2b3o2bo2b3obobo2bo3b2o2b2ob2o2b2o3b2ob2o2bo3b2o2bobo2bo2b2o2bobo2b
o2bobobobob3obo5bobo3b2o3bo2b3o2bo3bo2bobo3bo2b2o2bo3bo2b3o2bo2b2o2bo
bo5b3o6bo2bo3b2o2b2o2b2ob2o2bo5bo2bo2bo2bo3bo3bo!
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
User avatar
R2INT
Posts: 811
Joined: July 2nd, 2024, 7:42 pm

Re: R2INT (CA simulator programming/discussion)

Post by R2INT »

Currently trying to add compression to .r2int files:

Code: Select all

xxxxxx000xx0x0xx111xxxxxx
xxxxxx001xx0x0xx011xxxxxx
xxxxxx001xx0x0xx101xxxxxx
xxxxxx001xx0x0xx110xxxxxx
xxxxxx000xx0x1xx011xxxxxx
xxxxxx000xx0x1xx101xxxxxx
xxxxxx000xx0x1xx110xxxxxx
xxxxxx001xx0x1xx001xxxxxx
xxxxxx001xx0x1xx010xxxxxx
xxxxxx010xx0x0xx011xxxxxx
xxxxxx001xx0x1xx100xxxxxx
xxxxxx010xx0x0xx101xxxxxx
xxxxxx010xx0x0xx110xxxxxx
xxxxxx00xxxx1xxxxxxxxxxxx
xxxxxx0x0xxx1xxxxxxxxxxxx
xxxxxxx00xxx1xxxxxxxxxxxx
xxxxxxxxxxx0x0xx111xxxxxx
xxxxxx0xxxxx1xxx0xxxxxxxx
xxxxxxx0xxxx1xxx0xxxxxxxx
xxxxxxxx1xx0x0xxx11xxxxxx
xxxxxxxx1xxx1xxx1xxxxxxxx
xxxxxxx0xxx0x0xxx01xxxxxx
xxxxxx010xx0x1xx001xxxxxx
xxxxxx0xxxx0x0xxx10xxxxxx
xxxxxx010xx0x1xx010xxxxxx
xxxxxx011xx0x0xx001xxxxxx
xxxxxx011xx0x0xx010xxxxxx
xxxxxx011xx0x0xx100xxxxxx
xxxxxx010xx0x1xx100xxxxxx
xxxxxx0xxxx01xxxxxxxxxxxx
xxxxxxx0xxx01xxxxxxxxxxxx
xxxxxxxx0xxxx1xx011xxxxxx
xxxxxxxx0xx01xxxxxxxxxxxx
xxxxxxx0xxxxx1xx101xxxxxx
xxxxxx0xxxxxx1xx110xxxxxx
xxxxxx011xx0x1xx000xxxxxx
xxxxxx100xx0x0xx011xxxxxx
xxxxxx100xx0x0xx101xxxxxx
xxxxxx0xxxxx1xxxx0xxxxxxx
xxxxxx100xx0x0xx110xxxxxx
xxxxxxx1xxxx1xxxx1xxxxxxx
xxxxxxxx0xx0x0xx0x1xxxxxx
xxxxxxxx0xxx1xxxx0xxxxxxx
xxxxxxx1xxx0x0xx1x1xxxxxx
xxxxxx0xxxx0x0xx1x0xxxxxx
xxxxxxxxxxxx1xxx00xxxxxxx
xxxxxx101xx0x0xx001xxxxxx
xxxxxx101xx0x0xx010xxxxxx
xxxxxxx11xx0x0xxxx1xxxxxx
xxxxxx101xx0x0xx100xxxxxx
xxxxxx0x1xx0x0xxxx0xxxxxx
xxxxxx000xx1x0xx011xxxxxx
xxxxxx01xxx0x0xxxx0xxxxxx
xxxxxxxxxxx01xxx0xxxxxxxx
xxxxxx000xx1x0xx101xxxxxx
xxxxxxx01xxxx1xxx01xxxxxx
xxxxxx000xx1x0xx110xxxxxx
xxxxxx0x1xxxx1xxx10xxxxxx
xxxxxx00xxxxx1xxx00xxxxxx
xxxxxx110xx0x0xx001xxxxxx
xxxxxx110xx0x0xx010xxxxxx
xxxxxx110xx0x0xx100xxxxxx
xxxxxx111xx0x0xx000xxxxxx
xxxxxx000xx1x1xx001xxxxxx
xxxxxx100xx0x1xx001xxxxxx
xxxxxx101xx0x1xx000xxxxxx
xxxxxx100xx0x1xx010xxxxxx
xxxxxx000xx1x1xx010xxxxxx
xxxxxx000xx1x1xx100xxxxxx
xxxxxx100xx0x1xx100xxxxxx
xxxxxx011xxxx1xxxx0xxxxxx
xxxxxxxxxxxx1xxx0x0xxxxxx
xxxxxxx01xx0x0xxx0xxxxxxx
xxxxxx1x1xx0x0xxx1xxxxxxx
xxxxxx111xx0x0xxxxxxxxxxx
xxxxxx10xxx0x0xxx0xxxxxxx
xxxxxx110xx0x1xx000xxxxxx
xxxxxx011xx1x0xx000xxxxxx
xxxxxx001xx1x0xx001xxxxxx
xxxxxx1xxxxx1xxxxx1xxxxxx
xxxxxx001xx1x0xx010xxxxxx
xxxxxxxxxxx01xxxx0xxxxxxx
xxxxxx001xx1x0xx100xxxxxx
xxxxxxx0xxxx1xxxxx0xxxxxx
xxxxxxxx0xx0x0xx01xxxxxxx
xxxxxxx10xxxx1xx0x1xxxxxx
xxxxxx101xxxx1xxx0xxxxxxx
xxxxxxxxxxxx1xxxx00xxxxxx
xxxxxx0x0xxxx1xx0x0xxxxxx
xxxxxxx10xx0x0xx0xxxxxxxx
xxxxxx01xxxxx1xx1x0xxxxxx
xxxxxx1x0xx0x0xx0xxxxxxxx
xxxxxxxx0xxx1xxxxx0xxxxxx
xxxxxx11xxx0x0xx1xxxxxxxx
xxxxxx0xxxxx10xxxxxxxxxxx
xxxxxxx0xxxx10xxxxxxxxxxx
xxxxxxx0xxx0x0xx10xxxxxxx
xxxxxxxx0xx1xxxx011xxxxxx
xxxxxx1xxxx0x0xx11xxxxxxx
xxxxxxxx0xxx10xxxxxxxxxxx
xxxxxx011xx1xxxxxx0xxxxxx
xxxxxxx0xxx1xxxx101xxxxxx
xxxxxx101xx1x0xx000xxxxxx
xxxxxx001xx1x1xx000xxxxxx
xxxxxx0xxxx1xxxx110xxxxxx
xxxxxx010xx1x0xx001xxxxxx
xxxxxx010xx1x0xx010xxxxxx
xxxxxxxxxxxx10xx0xxxxxxxx
xxxxxx010xx1x0xx100xxxxxx
xxxxxxx01xx1xxxxx01xxxxxx
xxxxxx101xx1xxxxx0xxxxxxx
xxxxxx0x1xx1xxxxx10xxxxxx
xxxxxx00xxx1xxxxx00xxxxxx
xxxxxx010xx1x1xx000xxxxxx
xxxxxx110xxxx1xx0xxxxxxxx
xxxxxx110xx1x0xx000xxxxxx
xxxxxxxxxxx111xxxxxxxxxxx
xxxxxxxxxxxx10xxx0xxxxxxx
xxxxxxx00xxxxxxx001xxxxxx
xxxxxxx10xx1xxxx0x1xxxxxx
xxxxxx0x0xx1xxxx0x0xxxxxx
xxxxxx0x0xxxxxxx010xxxxxx
xxxxxx01xxx1xxxx1x0xxxxxx
xxxxxx00xxxxxxxx100xxxxxx
xxxxxx001xxxxxxxx00xxxxxx
xxxxxx110xx1xxxx0xxxxxxxx
xxxxxx010xxxxxxx0x0xxxxxx
xxxxxxxxxxx01xxxxx0xxxxxx
xxxxxxx00xxxx1xx00xxxxxxx
xxxxxx1x0xxxx1xx01xxxxxxx
xxxxxx10xxxxx1xx10xxxxxxx
xxxxxx100xx1x0xx001xxxxxx
xxxxxx100xx1x0xx010xxxxxx
xxxxxx100xx1x0xx100xxxxxx
xxxxxx100xx1x1xx000xxxxxx
xxxxxxxxxxxx10xxxx0xxxxxx
xxxxxxx00xx1xxxx00xxxxxxx
xxxxxx1x0xx1xxxx01xxxxxxx
xxxxxx10xxx1xxxx10xxxxxxx
xxxxxx100xxxxxxx00xxxxxxx
This is an (incorrect) representation of B3/S23. I am currently working on fixing that.
EDIT (9 mins later): fixed?

Code: Select all

x00011100xxxxxxxxxxxxxxxx
x01011000xxxxxxxxxxxxxxxx
x01010100xxxxxxxxxxxxxxxx
x01001100xxxxxxxxxxxxxxxx
x00111000xxxxxxxxxxxxxxxx
x00110100xxxxxxxxxxxxxxxx
x00101100xxxxxxxxxxxxxxxx
x10011000xxxxxxxxxxxxxxxx
x10010100xxxxxxxxxxxxxxxx
x10001100xxxxxxxxxxxxxxxx
x01110000xxxxxxxxxxxxxxxx
x11010000xxxxxxxxxxxxxxxx
x01101000xxxxxxxxxxxxxxxx
x11001000xxxxxxxxxxxxxxxx
x11000100xxxxxxxxxxxxxxxx
x01100100xxxxxxxxxxxxxxxx
10xxxxxx0xxxxxxxxxxxxxxxx
1x0xxxxx0xxxxxxxxxxxxxxxx
100xxxxxxxxxxxxxxxxxxxxxx
xxx01110xxxxxxxxxxxxxxxxx
x10110000xxxxxxxxxxxxxxxx
x10101000xxxxxxxxxxxxxxxx
x11100000xxxxxxxxxxxxxxxx
x10100100xxxxxxxxxxxxxxxx
x00011001xxxxxxxxxxxxxxxx
x01010001xxxxxxxxxxxxxxxx
1xxxxx0x0xxxxxxxxxxxxxxxx
10xxxx0xxxxxxxxxxxxxxxxxx
xx1011x0xxxxxxxxxxxxxxxxx
x01001001xxxxxxxxxxxxxxxx
1x1xxx1xxxxxxxxxxxxxxxxxx
x01000101xxxxxxxxxxxxxxxx
x00010101xxxxxxxxxxxxxxxx
x0x010x0xxxxxxxxxxxxxxxxx
x00001101xxxxxxxxxxxxxxxx
xxx001x00xxxxxxxxxxxxxxxx
1xxxxxx00xxxxxxxxxxxxxxxx
10xxxxx0xxxxxxxxxxxxxxxxx
xx01110xxxxxxxxxxxxxxxxxx
1x0xxxx0xxxxxxxxxxxxxxxxx
1xxxx0xx0xxxxxxxxxxxxxxxx
x0x1101xxxxxxxxxxxxxxxxxx
xxx1011x0xxxxxxxxxxxxxxxx
11xxx1xxxxxxxxxxxxxxxxxxx
x10010001xxxxxxxxxxxxxxxx
x10001001xxxxxxxxxxxxxxxx
xx001x00xxxxxxxxxxxxxxxxx
x10000101xxxxxxxxxxxxxxxx
1xxxx00xxxxxxxxxxxxxxxxxx
x1101xx0xxxxxxxxxxxxxxxxx
1x0xx0xxxxxxxxxxxxxxxxxxx
xx100xx00xxxxxxxxxxxxxxxx
x1x00xx00xxxxxxxxxxxxxxxx
x1x01x10xxxxxxxxxxxxxxxxx
xxx00x100xxxxxxxxxxxxxxxx
x00110001xxxxxxxxxxxxxxxx
x01100001xxxxxxxxxxxxxxxx
x11000001xxxxxxxxxxxxxxxx
1xxx0x0xxxxxxxxxxxxxxxxxx
x10100001xxxxxxxxxxxxxxxx
x010x0x0xxxxxxxxxxxxxxxxx
xx10x1x01xxxxxxxxxxxxxxxx
x0x0x0x01xxxxxxxxxxxxxxxx
x110xxx01xxxxxxxxxxxxxxxx
1xxx00xxxxxxxxxxxxxxxxxxx
x1110xxx0xxxxxxxxxxxxxxxx
x100xx00xxxxxxxxxxxxxxxxx
xx00xx001xxxxxxxxxxxxxxxx
x1x0xx101xxxxxxxxxxxxxxxx
x00011010xxxxxxxxxxxxxxxx
x00010110xxxxxxxxxxxxxxxx
x00101001xxxxxxxxxxxxxxxx
x00001110xxxxxxxxxxxxxxxx
x00100101xxxxxxxxxxxxxxxx
x11000010xxxxxxxxxxxxxxxx
1xxxxx00xxxxxxxxxxxxxxxxx
1xxxx0x0xxxxxxxxxxxxxxxxx
x01110xxxxxxxxxxxxxxxxxxx
x1011x0xxxxxxxxxxxxxxxxxx
xx010x0x0xxxxxxxxxxxxxxxx
xx1101xx0xxxxxxxxxxxxxxxx
x1x10x1x0xxxxxxxxxxxxxxxx
x0x100xx0xxxxxxxxxxxxxxxx
x011x0xx1xxxxxxxxxxxxxxxx
x00110010xxxxxxxxxxxxxxxx
x00101010xxxxxxxxxxxxxxxx
x101xx0x1xxxxxxxxxxxxxxxx
x00100110xxxxxxxxxxxxxxxx
x11x0xx10xxxxxxxxxxxxxxxx
1xxx1xxx1xxxxxxxxxxxxxxxx
x01000011xxxxxxxxxxxxxxxx
10xx0xxxxxxxxxxxxxxxxxxxx
x10000011xxxxxxxxxxxxxxxx
xx00x100xxxxxxxxxxxxxxxxx
1x0x0xxxxxxxxxxxxxxxxxxxx
x0x0x010xxxxxxxxxxxxxxxxx
xxx0x1101xxxxxxxxxxxxxxxx
x10010010xxxxxxxxxxxxxxxx
x10001010xxxxxxxxxxxxxxxx
x10000110xxxxxxxxxxxxxxxx
x01xx0x11xxxxxxxxxxxxxxxx
1xx0xxxx0xxxxxxxxxxxxxxxx
10x0xxxxxxxxxxxxxxxxxxxxx
x10xxx011xxxxxxxxxxxxxxxx
x10100010xxxxxxxxxxxxxxxx
xx0x1101xxxxxxxxxxxxxxxxx
1x00xxxxxxxxxxxxxxxxxxxxx
x0xx1011xxxxxxxxxxxxxxxxx
x01010010xxxxxxxxxxxxxxxx
xxxx01110xxxxxxxxxxxxxxxx
x01001010xxxxxxxxxxxxxxxx
x01000110xxxxxxxxxxxxxxxx
1xx0x0xxxxxxxxxxxxxxxxxxx
x10x1x01xxxxxxxxxxxxxxxxx
xx0x0x010xxxxxxxxxxxxxxxx
x1xx0x110xxxxxxxxxxxxxxxx
1xxx0xx0xxxxxxxxxxxxxxxxx
x001x00xxxxxxxxxxxxxxxxxx
xx01x10x1xxxxxxxxxxxxxxxx
x10x0x0x0xxxxxxxxxxxxxxxx
x0x1x01x1xxxxxxxxxxxxxxxx
x01100010xxxxxxxxxxxxxxxx
1xx1xxx1xxxxxxxxxxxxxxxxx
x00x100xxxxxxxxxxxxxxxxxx
xx0x010x0xxxxxxxxxxxxxxxx
x0xx001x0xxxxxxxxxxxxxxxx
1xx0xx0xxxxxxxxxxxxxxxxxx
x01x10x1xxxxxxxxxxxxxxxxx
xx1x01x10xxxxxxxxxxxxxxxx
x0xx00x10xxxxxxxxxxxxxxxx
x00010011xxxxxxxxxxxxxxxx
x01x00xx0xxxxxxxxxxxxxxxx
x00001011xxxxxxxxxxxxxxxx
x00000111xxxxxxxxxxxxxxxx
x00100011xxxxxxxxxxxxxxxx
1xx00xxxxxxxxxxxxxxxxxxxx
x00xx001xxxxxxxxxxxxxxxxx
xx0xx1011xxxxxxxxxxxxxxxx
x0xxx0111xxxxxxxxxxxxxxxx
x00xx00x1xxxxxxxxxxxxxxxx
Range-2 INT
R2INT's Rule Collection

Travelling Ts has surpassed LeapLife in post count, but not yet in technology.
Post Reply