TI-83/84+ "CUBELAB" (scrambler, etc.)

Swordsman Kirby

Veteran
Joined
Apr 29, 2006
Messages
1,802
I wrote this script who-knows-how-long-ago... If you actually plan on implementing the entire thing, good luck, and watch out what order you're putting the programs in, since they reference each other. There are more inefficiencies than I originally thought.

prgmCUBELAB
Code:
ClrHome
Menu("SELECT OPTION","INPUT",1,"SCRAMBLE",2,"VIEW TIMES",3,"CLEAR AVERAGE",4,"TIMER",5,"EXIT",6)
Lbl 1
prgmZADD
Lbl 2
prgmSCRAMBLE
Lbl 3
prgmDISPTIME
Lbl 4
prgmCLRAVG
Lbl 5
prgmTIMER
Lbl 6
Stop
prgmSCRAMBLE
Code:
ClrHome
8->A
8->B
8->C
For(X,0,24,1)
While C=B
randInt(1,6)->C
A+B->D
If C=A
Then 
If D=7
Then
C->E
While C=E
randInt(1,6)->E
End
E->C
End
End
End
B->A
C->B
iPart(X/5)+1->Y
15fPart(x/5)+1->Z
If C=1
Output(Y,Z,"U")
If C=2
Output(Y,Z,"F")
If C=3
Output(Y,Z,"R")
If C=4
Output(Y,Z,"L")
If C=5
Output(Y,Z,"B")
If C=6
Output(Y,Z,"D")
randInt(1,3)->W
If W=1
Output(Y,Z+1,"'")
If W=2
Output(Y,Z+1,"2")
End
pgrmAVG
Code:
ClrHome
F+1->F
X->L1(F)
1-Var Stats
ClrHome
Disp "SOLVES:"
Output(1,9,n)
If n>2
Then
(sumx-maxX-minX)/(n-2)->E
Disp "AVERAGE:"
Output(2,10,round(E,2))
Disp "FASTEST:"
Output(3,10,minX)
Disp "SLOWEST:"
Output(4,10,maxX)
Disp "SDEV:"
Output(5,7,round(sigmax,2))
If n>12
prgmROLL
End
Pause
prgmCUBELAB
prgmCLRAVG
Code:
ClrList L1
0->F
ClrHome
prgmCUBELAB
prgmDISPSUB
Code:
ClrHome
7->I
If G+7>n
n-G+1->I
For(X,1,I,1)
G-1+X->Z
If L1(Z)=maxX or L1(Z)=minx
Output(X,1,"-")
Output(X,2,L1(Z))
End
prgmDISPTIME
Code:
1->G
1-Var Stats
While G<=n
prgmDISPSUB
G+7->G
Pause
End
ClrHome
Disp "=>"
Output(1,3,round((sumx-minX-maxX))/(n-2),2))
Disp "SDEV:"
Output(2,7,round(sigmax,2))
Pause
prgmCUBELAB
prgmDNF
Code:
9999->X
prgmAVG
prgmP2
Code:
X+2->X
prgmAVG
prgmROLL
Code:
1-Var Stats
n-12->X
For(Y,0,11,1)
L1(X+Y+1)->L2(Y+1)
End
1-Var Stats L2
Disp "RAVG:"
Output(6,6,round((sumx-minX-maxX)/10,2))
Disp "RFASTEST:"
Output(7,11,minX)
Disp "RSLOWEST:"
Output(8,11,maxX)
prgmTIMER
Code:
Disp "READY..."
Pause
0->A
0->B
While A=0 or A=115
getKey->A
ClrHome
Disp round(B/15.4**,2)
B+1->B
End
ClrHome
Disp round(B/15.4**,2)
round(B/15.4**,2)->X
Pause
Menu("OPTIONS","SAVE",1,"DISCARD",2,"+2",3,"DNF",4)
Lbl 1
prgmAVG
Lbl 2
prgmCUBELAB
Lbl 3
prgmP2
Lbl 4
prgmDNF
**This may depend on your calculator. Choose appropriately!
prgmZADD <--- don't know why I called it that
Code:
ClrHome
Disp "ENTER TIME:"
Input X
prgmAVG
 
Ohhhh wow its too early for me to be thinking in anything other than basic english.
But this looks good, I read through the code...if I can dig out my transfer cable I'll give it a go later today.
 
Could anyone upload these programs somewhere? That way everyone wont have to use their graph link and copy-paste all the code :)
Is this just for calculating averages and such, or is it an actual timer aswell? (Its been a while since I programmed on my TI :))
If it is a timer:
Will the timer work the same on TI-84 and TI-83 (equally accurate)?
I remember my snake game running way faster on TI-84 :)
 
Last edited:
This is pretty basic, but nice. I made a timer, scrambler, PB saver, averager, and session saver on my TI-73. I don't have a link to share it with you guys though.

Btw Swordsman Kirby, will your scrambler detect if a turn is repeated directly after it, or something like D U D'? My scrambler prevents all that with some simple tests...
 
Looks good.

I once wrote a scramble program for 3x3, 8 years ago. It was really simple and all it did was generate a scramble string, with the appropriate tests to avoid things like DUD'. It was for the TI-86.
 
This is pretty basic, but nice. I made a timer, scrambler, PB saver, averager, and session saver on my TI-73. I don't have a link to share it with you guys though.

Btw Swordsman Kirby, will your scrambler detect if a turn is repeated directly after it, or something like D U D'? My scrambler prevents all that with some simple tests...

Yeah it does. I've made sure the scrambler's absolutely correct.

If it is a timer:
Will the timer work the same on TI-84 and TI-83 (equally accurate)?

No it won't, note the asterisks.
 
Can you explain the iPart and fPart functions in prgmSCRAMBLE? Also the While loops? I don't read other people's code very well.
 
Can you explain the iPart and fPart functions in prgmSCRAMBLE? Also the While loops? I don't read other people's code very well.

iPart and fPart refer to "integer part" and "fractional part". Basically, with a given integer, I want to convert it so that it appears in nice rows. This was the only way I could think of.

The while loops for the scrambler prevent stuff like "U U" or "U D U".

For the display script, prgmDISPSUB displays the seven times from G to G+7. Now, the while loop prevents me from going over "n", the total number of times.
 
Cool, ive been messing around with the programming on mine lately. Have'nt thoght of this though. How much memory doe this take up? hopefully enough so that I can try to get a scrambler for a 4x4x4.
 
I haven't figured out a good way of writing the notation on the calculator for 4x4+... there's a lack of lowercase letters.
 
does this work on the TI-89 Titanium edition?

No it doesn't: the syntax is different.

alexc said:
I just got a TI 83 calc (need it for high school) and I'm not much for programming and stuff. Could somebody explain how this works?

If you look roughly in the center of the buttons, there's one called "PRGM"... From that, you can create new programs and edit old ones.
 
The code should run a lot faster if you construct loops with "Lbl" "If" and "Goto" rather than using "For" and "While".

It takes more code to setup but I found that TI-OS' implementation of For/While is a lot slower than having your own Goto statements (um, you wouldn't apply this thinking to other languages like Java or C).

Tim.
 
does this work on the TI-89 Titanium edition?

No it doesn't: the syntax is different.

alexc said:
I just got a TI 83 calc (need it for high school) and I'm not much for programming and stuff. Could somebody explain how this works?

If you look roughly in the center of the buttons, there's one called "PRGM"... From that, you can create new programs and edit old ones.

Yes, but how do you create the program? Do you have to plug it up to a computer and enter all that code you have in the first post?
 
The code should run a lot faster if you construct loops with "Lbl" "If" and "Goto" rather than using "For" and "While".

It takes more code to setup but I found that TI-OS' implementation of For/While is a lot slower than having your own Goto statements (um, you wouldn't apply this thinking to other languages like Java or C).

Tim.

I used to use Lbl for everything. For loops for the most part are very easy to learn, not very slow, and takes up less room. I never use While loops though.
 
Using Goto is generally considered bad programming, unless of course it's an assembly language, in which case branching is all you do for flow control.

So I avoid it in my TI programs. Never tried witting an asm TI program though.

TI-83's languages is a lot different to TI-98's. It would take some serious effort to *port* the program over.
 
does this work on the TI-89 Titanium edition?

No it doesn't: the syntax is different.

alexc said:
I just got a TI 83 calc (need it for high school) and I'm not much for programming and stuff. Could somebody explain how this works?

If you look roughly in the center of the buttons, there's one called "PRGM"... From that, you can create new programs and edit old ones.

Yes, but how do you create the program? Do you have to plug it up to a computer and enter all that code you have in the first post?

Check your manual for everything you need.
 
Back
Top