From e1b9acf2e62dacb2a7c75d363ae478160bef9d15 Mon Sep 17 00:00:00 2001 From: "Nazim@misirlou" <nazim@internet.gestell> Date: Wed, 4 Dec 2024 12:01:05 +0100 Subject: [PATCH] houba kuber --- n-vivace-satreach-cyber/b-satkubernetes.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/n-vivace-satreach-cyber/b-satkubernetes.py b/n-vivace-satreach-cyber/b-satkubernetes.py index fd4f8e3..55cc96b 100644 --- a/n-vivace-satreach-cyber/b-satkubernetes.py +++ b/n-vivace-satreach-cyber/b-satkubernetes.py @@ -2,14 +2,13 @@ import yNaming as naming RADIUS=1 CONTROLSHIFT=1 # shift for reading the initial and final configurations NTRANS=8 -T=7 # number of time steps +T=20 # number of time steps N=9 #transition table -#tabTRANSsft=[0,1,0,1,0,1,0,1]#shift -#tabTRANS=[0,1,1,1,1,0,0,0 ]# ECA30 -tabTRANS=[0,1,1,1,1,1,1,0 ]# ECA126 +ECA=126 +TABTRANS=sbin='{0:08b}'.format(ECA)[::-1] sx="*1101111*" # initial configuration sy="*0111001*" # final configuration @@ -23,7 +22,7 @@ def setConfigCondition(cond, time): if cond[i]=='*': # hack to make the variable appear print( naming.signedName('0', time, i) + " " + naming.signedName('1', time, i)) if cond[i] == '0' or cond[i] == '1': - biti=str(cond[i]) + biti=cond[i] print ( naming.signedName(biti, time, i) ) @@ -58,7 +57,7 @@ def genTransitions(t,posi): x,y,z= (i//4)%2, (i//2)%2, i%2 cond="%d%d%d"%(x,y,z) komm="tr(%d,%d)"%(t,posi) - result=str(tabTRANS[i]) # transition table output (as str) + result=TABTRANS[i] # transition table output (as str) c1= genTransitionECA(cond,t,posi,result,komm)#transition to one print(c1+cond+">"+result) @@ -83,11 +82,8 @@ def run(): genSpaceTime(T) - - run() - #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- GitLab