Talk:$tonePits

From Esolang
Jump to navigation Jump to search

Additions --- Building a Register Machine with 2 Incrementable and Decrementable 2-bit registers


Well, quite some reading thinking and here are the results. I am trying to build something like a register machine inspired by FRACTRAN and using a good Oscillator which I have not found yet --- so have it with a bad one.

Here's the Oscillator (repeating pattern or whatever you prefer).

4,2,1   :#0 (just short for should represent zero) 
3,2,1,1 :#1 
3,2,2   :#2 
3,3,1   :#3 
4,2,1       

Ooh, should have told you before these patterns/game positions are created by always sowing from the left most pit which contains stones. The reason I am using it in this sample is that it is easy to revert which will be helpful for defining or the decrement operation.

Well, at least we got for distinct numbers and a way to increment them. (rem.: always sowing from the leftmost pit who contains stones). Well, decrementing is just the opposit, thus beginning from the right most pit who con.... (you have it by now)

One could say we have the equivalent of a Paleolithic two bit register who requires much more pits to be digged out.

Let's remind on FRACTRAN's famous addition program 3/2 or three halfs. I build it now with those 2-bit registers.

One Register ought to be for the threes and one for the twos. We simplify those multiplying and so by just dealing with the exponents or in other words we just decrement and increment.

First we store our two operands in the registers, which due to the lack of better Oscillators can not be greater than 3. Let's say we use 1 and 2 for our sample.

RegisterA: 3,2,2,1 (see at the Oscillator section, we have to make it usable for the Oscillator) 
RegisterB: 3,2,2 

What we do now is incrementing RegisterA and decrementing RegisterB until RegisterB contains 4,2,1 , which is in fact the "code" for zero.

Here are the steps for further clearance:

RegisterA: 3,2,1,1 RegisterB: 3,2,2
RegisterA: 3,2,2   RegisterB: 3,2,1,1
RegisterA: 3,3,1   RegisterB: 4,2,1 

RegisterB contains the equivalent of zero and thus the program halts.

Thanks to all the Mancala researchers and ethnomathematicians and all others who helped me with their publications. I regret I could not make use of Ron Egash's 4,3,2,1 repeating pattern(Spaceship), but maybe someone else or he by himself can do.

Oscillators with higher periode


There are obviously oscillators with higher periode. like ...

7 7 6 5 3 2 1 
-------------
8 7 6 4 3 2 1   -> 1
8 7 5 4 3 2 1 1 -> 2 
8 6 5 4 3 2 2 1 -> 3
7 6 5 4 3 3 2 1 -> 4
7 6 5 4 4 3 2   -> 5
7 6 5 5 4 3 1   -> 6
7 6 6 5 4 2 1   -> 7
7 7 6 5 3 2 1   -> 0 (initial) repeating
8 7 6 4 3 2 1 

This program may be a help for the sowing algorithm.

main()
{char s[31]; 
 int i,j,h;
 for(i=0;i<31;++i){s[i]=0;}
 strcpy(s,"6665321"); 
 for(i=0;i<31;++i){if(s[i]){s[i]-='0';}}
 j=0;
 do
  {printf("%d ",s[j]);++j;}
 while(s[j]!=0); 
 printf("\n-------------\n");
 for(i=0;i<256;++i)
  {h=s[0]; 
   j=0;
   do
    {s[j]=s[j+1];
     ++j;}
   while(s[j]!=0);
   for(j=0;j<h;++j)
    {++s[j];}
   j=0;
   do
    {printf("%d ",s[j]);++j;}
   while(s[j]!=0); 
  printf("\n");
 }
}

Some sequences seem to be similar to the Collartz sequence in that they reach a periodic repeating pattern after some steps like 6 6 6 5 3 2 1. The repeating pattern starts with 7 6 5 4 3 3 1 ... Maybe this topic will get more researched in the future, maybe like Wolfram and the research done on Rule 110.