ec1ArchivePic1: {0}→L1:0→R:12→dim(?A):12→dim(?B):12→dim(?C) FnOff:PlotsOff:Normal:Float:Full:GridOff:AxesOff:ZStandard ClrDraw:ClrHome "TTT TTT
french. :( j/k
when I get home, I shall get this on my calc and try it.
I realize this code is not really compatible with any editor on the computer. Could take a little bit for me to sort this thing out.
EDIT: Erm, is that line that says
"Horizontal(10"
meant to be that way? Or should it be:
"Horizontal (10"
or:
"Horizontal 10"
?
Horizontal 10 because source coders seems to have issue parsing Horizontal x.x
It takes a long time to type this all out on calc... and I'm not even halfway yet x_x
Computer + Copy/Paste?
BTW, about the rules:
1. Are we optimizing for size, and size only? 2. The optimized program merely needs to function like the code, right? (We don't need to base it off that code?
And the second line:
"{0}→L1"
Is it meant to be:
"{0}→?1"
(list 1)?
for size mostly, but if you manage to get it both small and fast it raise your chances of winning. The optimised program must function like the code does, but you can use different code to do it, as long as it works exactly like in the code. and yes it is meant to be list 1
c1-->CODE | ec1Archive Pic1 DelVar R{0→L1 12→dim(?A 12→dim(?B 12→dim(?C FnOff PlotsOff Normal Float Full GridOff AxesOff ZStandard ClrDraw ClrHome "TTT TTT
QuoteBegin-Harrierfalcon+27 Aug, 2007, 21:48-->QUOTE (Harrierfalcon @ 27 Aug, 2007, 21:48) | c1-->CODE | ec1Ans(1→A Ans(2→B Ans(3→C Ans(4→D Ans(5→E Ans(6→F Ans(7→G Ans(8→H Ans(9→J Ans(10→T Ans(11→U Ans(12→Vc2 |
ec2 |
You... you can't be serious...
To optimize Harrier's code... c1-->CODE | ec1Archive Pic1 DelVar R{0→L1 12→dim(?A Ans→dim(?B Ans→dim(?C FnOff PlotsOff Normal Float Full GridOff AxesOff ZStandard ClrDraw ClrHome "TTT TTT
c1-->CODE | ec1:ArchivePic1 :12→dim(?A :12→dim(?B :12→dim(?C :FnOff :PlotsOff :Normal :Float :Full :GridOff :AxesOff :ZStandard :ClrHome :"TTT TTT
Mine's going to take a few more hours/days. I'm doing it on calc, and I'm going to link to the actual program when I submit it :P
no problem with sub routine, as long as you post all of them
c1-->CODE | ec1:ArchivePic1 :12→dim(LA :12→dim(LB :12→dim(LC :FnOff :AxesOff :ZStandard :ClrHome :Output(7,2,"Programme par :Output(8,2,"Kevin Ouellet :Repeat getKey=105 :Output(1,1,"TTT TTT
Heh the Ans(1 thing is easy. just do this each time: c1-->CODE | ec1 Ans->A Ans+Ans->B Ans+Ans->C ....and so on c2 |
ec2
QuoteBegin-Jon+28 Aug, 2007, 2:2-->QUOTE (Jon @ 28 Aug, 2007, 2:20) | Heh the Ans(1 thing is easy. just do this each time: c1-->CODE | ec1 Ans->A Ans+Ans->B Ans+Ans->C ....and so on c2 |
ec2 |
If you try that out, it actually doesn't work like you think. Because the current value in Ans is a list, storing Ans to A will actually make A into a list.
please dont murder my program jon lol... j/k its getting better and better at least ?ompared to the 5 years old crap I wrote in the first post ^^
But if it would work, it would be better of like this: c1-->CODE | ec1 Ans->A 2Ans->B 2Ans->C ....and so on c2 |
ec2
This: c1-->CODE | ec1ClrHome "TTT TTT
I was sure someone would manage to save over 100! %)
c1-->CODE | ec1:ArchivePic 1 :12→dim(LA :Ans→dim(LB :Ans→dim(LCc2 |
ec2 HA! 2 bytes!
dont worry I'll make sure to check the code samples in some way to make sure they work, in the mean time make sure it work yourself :P . It take ages to type everything people post here manually on calc because the formatting breaks when i paste it in TI-Graph Link or SourceCoder x.x
c1-->CODE | ec1:ArchivePic1 :{0→L1 :DelVar R12→dim(?A :Ans→dim(?B :Ans→dim(?C :Degree :FnOff :PlotsOff :Normal :Float :Full :CoordOff :GridOff :AxesOff :LabelOff :ExprOff :ZStandard :Func :Connected :Sequential :Real :ClrHome :Output(7,2,"Programme par :Output(8,2,"Kevin Ouellet :Repeat getKey=105 :Output(1,1,"TTT TTT
oh great somebody saved me some work. When I started those contest I didnt realised the huge task that was awaiting me (copy all programs posted one by one by and and compare size and see if they work) :D now I have one done alerady
*Xphoenix can help. I converted the original into a program, and edited off of that, so it shouldn't be too hard to convert those . . . Should I help?
well the original is alerady a program :P
it's the launching program for Team Demo found in Downloads/Calculator RPGs and Programming Tools/TI-83+/ feel free too help but you dont have to do it, it will just take longer to declare the winner :P
Well, the original does not function right if you, for instance, just copy it into graphlink. You need to take care of those special characters. I thought you meant it would be hard to turn all of these into working programs, at which point you could compare the size.
yeah but i meant that there is alerady a downloadable 8xp version of the file in the archives here. in the team demo zip there is prgm thetathetathetathetathetathetathetatheta.8xp, which is that program. Idk if it was locked down tho, you may need Mirage to open it. In my first post i used source coder to post the code but edited it because it didnt showed fine
I would give you mine, but it seems that the uploading is not working.
it should, else just upload to savefile.com
harrier, never forget to remove the last " in string storage so "TTT TTT T T T T T T T TTTT T TT TTT TTTT T T T T T T T TTT T T T T= -= 2002 =- ="→Str1 would become "TTT TTT T T T T T T T TTTT T TT TTT TTTT T T T T T T T TTT T T T T= -= 2002 =- =→Str1
And burr it is Output(, not Text(, since the program title screen if homescreen
I still didnt checked all programs but I have went through some of them alerady on first page, don't worry ;)
Update. I am sorry to announce that the first BASIC optimizing contest is being cancelled (in some ways).
As some people have noticed I've did lot of works and updates on Omnimaga website in the past week. When I've started those contests, I did not realise the pain and hassle I would have to try everybody's program. Since the formatting in those piece of code is different than TI-Graph Link and SourceCoder I have to copy every single piece of code by hand on my calculator, one by one, and this is just way too much work for me alone. Sorry everyone :(
So what I am doing now, is that I am skipping to Contest 2 without declaring any winners for the first one, which is cancelled. However, contest 2 use the EXACT same piece of code than the first one (see the first post of this topic). You have to optimize it to make it as small as possible and make sure it still function like the original. However, you must include a 8xp file with your source code posted here. If the forum upload doesn't work for you use http://www.savefile.com to upload your optimized program.
Afterward, all programs will be tested directly on calc, and size of each of them will be compared, to finally declare the winner.
Sorry again for this.
Two things:
1. Forum upload doesn't work for me... When I attach, and then preview OR post, it takes me the portal.
2. This is sort of a compilation of everyone's code, so... (Namely Weregoose and burr)
3. http://www.savefile.com/files/1023805
4. I can't count right right now.
[ EDIT ]
Oh yeah...
5. Source:
QuoteBegin-"BASIC Code"+-->QUOTE ("BASIC Code") | :ArchivePic1 :DelVar R12→dim(?A :Ans→dim(?B :Ans→dim(?C :FnOff :PlotsOff :Normal :Float :Full :GridOff :AxesOff :ZStandard :ClrHome :"? :For(A,1,4 :For(B,1,40 :Ans+sub(" TTTT EEEE AAAA MMMM",5A-4,expr(sub("4412121221211225213145212112221221422212",B,1 :End :Ans+sub("
Wouldn't combining everyone else's code be cheating? ._.
not in this contest, because your goal is also to find more optimizations in the code people posts as well, so the prgm is even better. make sure to say you took some part of the code tho
In that case, you can change... c1-->CODE | ec1If θ=15 and LA(1 ?A→L1 If θ=32 and LB(1 ?B→L1 If θ=49 and LC(1 ?C→L1c2 |
ec2 Into... c1 -->CODE | ec1For(X,1,3 expr("?"+sub("ABC",X,1 If θ=17X-2 and Ans(1 Ans→L1 Endc2 |
ec2 In order to save six bytes.
http://www.savefile.com/files/1026482
QuoteBegin-Weregoose+3 Sep, 2007, 3:02-->QUOTE (Weregoose @ 3 Sep, 2007, 3:02) | In that case, you can change... c1-->CODE | ec1If θ=15 and LA(1 ?A→L1 If θ=32 and LB(1 ?B→L1 If θ=49 and LC(1 ?C→L1c2 |
ec2 Into... c1 -->CODE | ec1For(X,1,3 expr("?"+sub("ABC",X,1 If θ=17X-2 and Ans(1 Ans→L1 Endc2 |
ec2 In order to save six bytes. |
WHOA! i didnt know you could do that! could you also declare lists like that? i must test this!
The concept of a user giving a name to a list by any means other than explicitly typing it out has been beaten to death. I'm sorry to say that it cannot be done in TI-Basic.
you mean using input?
No, he means having the user input the name and for a list to then be created with that name.
yeah thats what i meant, i wish it was possible tho, too bad it isn't
Sooooo. . . Contest over?
well if anyone still have new programs i can accept them, but for now you're kinda winner by default since you're the only one to meet the (new) requirements x.x (both source posted and a 8xp file)
thanks to everyone for participating though, I'll try to prepare more when i do the next contest. It may be another prgm from this game, but I'm not sure yet.
I provided a .8xp... just to the wrong upload site :icebeam:
Any thoughts on what the next basic optimization project could be?
oh crap missed it, but i know the others people like weregoose didn't, even if they read the new rules
If you guys want, I can post one of my own programs and see how you can optimize it. Note, however, that it uses xLib heavily.
That sounds like a good challenge. xLib unreadability should be a tough obstacle to add to the contest.
I'm trying (once again) to program a Tic Tac Toe game. I could submit that for an optimization contest here, since it's not like I could submit it to ticalc ;)
Alright then guys, here it is; turns it it doesn't use xLib as much as some of my other programs: c1-->CODE | ec1:6→dim(L5 :Text(‾1,0,0,"CHOOSE A TRAIT: :Text(‾1,9,0,">DARE DEVIL :Text(‾1,18,6,"CAUTIOUS :Text(‾1,27,6,"GEAR HEAD :Text(‾1,36,6,"PACIFIST :Text(‾1,45,6,"BLOODTHIRSTY :Text(‾1,54,6,"RANDOM TRAIT :DelVar B1→A :Repeat B=54 :0 :Repeat Ans :real(8 :End :Ans→B :A→E :A+(B=1 and A<6)-(B=4 and A>1→A :If A≠E:Then :For(C,9E,9A,A-E :Text(‾1,C-1,0," :Text(‾1,C,0,"> :For(D,0,Z/5 :End:End:End:End :A-(A=6)(randInt(1,5→L5(1 :prgmθSTDRKN :real(12,6,0,0,95,62,1 :Text(‾1,0,0,"USE ARROW KEYS :Text(‾1,9,0,"TO PUT POINTS IN :Text(‾1,18,0,">PILOTING: :Text(‾1,27,6,"GUNNERY: :Text(‾1,36,6,"MERCHANT: :Text(‾1,45,6,"ENGINEERING: :Text(‾1,54,0,"EXTRA: :4→dim(L2 :L5(1→A :Fill 2,L5 :A→L5(1 :L5(2)+(A<3)-(A=3→L5(2 :L5(3)+(A=5)-not(fPart(A/2→L5(3 :L5(4)+(A=4)-(A=5→L5(4 :L5(5)+(A=3)-(A=1→L5(5 :For(A,1,4 :L5(A+1→L2(A :End :11→L5(6 :prgmθSTLGHT :2→A :While L5(6 :For(B,2,6 :Text(‾1,9B,82,L5(B :If 10>L5(B :Text(‾1,9B,88," :End :Repeat B=3 or B=2 :Repeat Ans :real(8 :End :Ans→B :A→E :A+(B=1 and A<5)-(B=4 and A>2→A :If A≠E:Then :For(C,9E,9A,A-E :Text(‾1,C-1,0," :Text(‾1,C,0,"> :For(D,0,Z/5 :End:End:End:End :B=3 and L5(6)>0 and L5(A)+1≤7+L2(A-1→C :C+L5(A→L5(A :L5(6)-C→L5(6 :B=2 and L5(A)-1≥L2(A-1→C :L5(A)-C→L5(A :C+L5(6→L5(6 :End :For(A,1,4 :Text(‾1,9A+9,82,L5(A+1 :End :DelVar L2real(12,6,0,55,95,62,1 :Text(‾1,54,0,"CONFIRM? (Y/N) :Repeat 5=abs(Ans-39 :real(8 :End :If Ans=34 :Then :DelVar L420→dim(L4 :{2,L5(1),L5(2),L5(3),L5(4),L5(5),125,100,0,2.2,5000,10→L4 :End :DelVar L5c2 |
ec2
Space Trader, right? Looks fairly well optimized, but I might be able to do a few bytes...
QuoteBegin-Xphoenix+7 Sep, 2007, 19:28-->QUOTE (Xphoenix @ 7 Sep, 2007, 19:28) | Space Trader, right? Looks fairly well optimized, but I might be able to do a few bytes... |
Yup, it actually took me some time to decide which one to post, as I didn't want to give away any secrets (like the two special reputations).
EDIT: W00t, 500 posts!
congrats delnar (*DJ Omnimaga
QUOTE | :If Ans=34 :Then :DelVar L420→dim(L4 :{2,L5(1),L5(2),L5(3),L5(4),L5(5),125,100,0,2.2,5000,10→L4 :End :DelVar L5 |
I just took a glance at this, looks fairly good. I just noticed that line, i wont point it out so you can find it ;)  .
QuoteBegin-kalan_vod+8 Sep, 2007, 4:2-->QUOTE (kalan_vod @ 8 Sep, 2007, 4:20) | QUOTE | :If Ans=34 :Then :DelVar L420→dim(L4 :{2,L5(1),L5(2),L5(3),L5(4),L5(5),125,100,0,2.2,5000,10→L4 :End :DelVar L5 |
I just took a glance at this, looks fairly good. I just noticed that line, i wont point it out so you can find it ;)  . |
Hehe, that is the exact line I was expecting for people to optimize. :P 
Making sure you realized, other than that I see a few things but I will find some time ;) (looking good though!).
c1-->CODE | ec1augment({2},augment(seq(L5(X),X,1,5),{125,\EE\2,0,2.2,5\EE\3,1->L4c2 |
ec2 Just saves 14 bytes.
Nice Weregoose!
How the heck could I forget about augment? :paf:
For some reasons I think weregoose will win this one, because i didn't found anymore possible optimizing in his last post
Actually, you can save 15 bytes here: c1-->CODE | ec1Text(-54125+1,0,0,"CHOOSE A TRAIT: For(X,1,6 Text(-54125+1,9X,6(X≠1),sub(">DARE DEVIL CAUTIOUS
Update: c1-->CODE | ec1:L5(1 :2+{Ans,Ans<3,Ans=5,Ans=4,Ans=3,9}-{2,Ans=3,not(fPart(.5Ans)),Ans=5,Ans=1,0→L5 :seq(Ans(X),X,2,5→L2 -or- ΔList(cumSum(Ans→L2:4→dim(L2c2 |
ec2 Another 10 bytes taken from there.
O_O :bow:
Well, I implemented all of the stuff I understood in Weregoose's post (aka everything, even if I don't use seq( and sub( ), and it turns out he optimized almost 100 Bytes off. The only thing I didn't implement was the rand(Z thing, because Weregoose probably didn't know what Z means (it is one of the most important variables, alongside Theta): in my program, Z represents the calculator model the program is running on so that the program doesn't go too fast or too slow during the "smooth" transitions. Z is determined towards the beginning of the first program that should be run.
Now that the obvious winner has been announced *cough*Weregoose*cough*, how about if I post the ugliest piece of code in Space Trader? It is kind of short, yet I am positive some of you will notice optimizations.
I think I'll only have more to say if I come up with something astronomical.
Looking forward to the next snippet. ;)
(Congrats on 2^9 8
congrats ^.^
Weregoose, how do you do that?! You are amazing...
Can anyone find a more elegant/smaller way to write: c1-->CODE | ec14+6fPart(A/3)+6not(fPart(A/3))c2 |
ec2 Those ending parentheses are there because this little slice of code is one of the coordinates in a text output. I'm just trying to figure out a way to turn the numbers seq(X,X,1,9) into {6,8,10,6,8,10,6,8,10}. I'm pretty sure my way isn't the best...
6+6fPart(A/3-3‾
Alright guys, cringe at the most horrible piece of code there is so far in Space Trader (FYI, it's the huge line): c1-->CODE | ec1:real(0,0 :real(3,8,0,1 :DelVar W54→B :Lbl A :Repeat W≥7 :If B>48 :Then :For(C,62,55,-1 :real(1,8,C,10,8,5,0,8W,0,0,1 :real(3,8,2,1 :For(D,0,Z :End:End:End :While Ans>53 or Ans<49 :real(8 :End :Ans→B :If W=2 :(B≠51)(55-B→E :not(W)(2(B=53)+3(B=52)+4(B=50)+7(B=51))+(W=2)(1+15(B=51))+(B≠49)((W=1)(4E+53-B)+(W=3)(7-B-14(B<52))+(W=4)(72-B)+(W=5)(75-B)+(W=6)(78-B→D[/b] :If D<7 :Then :real(12,0,9,55,85,55,1 :For(C,57,62 :real(12,1,8,C-1,86,C-1,1 :real(1,8,C,10,8,5,0,8W,0,0,1 :real(3,8,2,1 :For(F,0,Z :End:End:Endc2 |
ec2
Could you state what that line is trying to accomplish, in words? I don't feel like figuring it out myself. :P
All that is equivalent to: c1-->CODE | ec1If W=2 (B≠51)(55-B→E If W=0 2(B=53)+3(B=52)+4(B=50)+7(B=51→D If W=2 1+15(B=51→D If B≠49 Then If W=1 4E+53-B→D If W=3 7-B-14(B<52→D If W=4 72-B→D If W=5 75-B→D If W=6 78-B→D Endc2 |
ec2
O_O
...if it helps. I didn't optimize anything.
(All that = that one line)
uhm i dont understand what you mean, i felt it was kinda optimised because of the size decrease
c1-->CODE | ec1:not(W)(2(B=53)+3(B=52)+4(B=50)+7(B=51))+(W=2)(1+15(B=51))+(B≠49)((W=1)(4E+53-B)+(W=3)(7-B-14(B<52))+(W=4)(72-B)+(W=5)(75-B)+(W=6)(78-B→Dc2 |
ec2 = c1 -->CODE | ec1:If W=2 :(B≠51)(55-B→E :If W=0 :2(B=53)+3(B=52)+4(B=50)+7(B=51→D :If W=2 :1+15(B=51→D :If B≠49 :Then :If W=1 :4E+53-B→D :If W=3 :7-B-14(B<52→D :If W=4 :72-B→D :If W=5 :75-B→D :If W=6 :78-B→D :Endc2 |
ec2
c1-->CODE | ec1:If W=2 :Then :(B≠51)(55-B→E :1+15(B=51 :End :If not(W :2(B=53)+3(B=52)+4(B=50)+7(B=51 :If B≠49 :Then :If W=1 :4E+53-B :If W=3 :7-B-14(B<52 :If W>3 :84-3W :End :Ans→D c2 |
ec2
A little bit beter
oh that line, i see
QuoteBegin-nitacku+12 Sep, 2007, 3:32-->QUOTE (nitacku @ 12 Sep, 2007, 3:32) | c1-->CODE | ec1:If W=2 :Then :(B?51)(55-B?E :1+15(B=51 :End :If not(W :2(B=53)+3(B=52)+4(B=50)+7(B=51 :If B?49 :Then :If W=1 :4E+53-B :If W=3 :7-B-14(B<52 :If W>3 :84-3W :End :Ans?D c2 |
ec2
A little bit beter |
Actually, since the code is all on one line, your optimization has no effect in the real code. Here is what the code I posted above does. Some of you might have seen the screenshot a long time ago: 
i think he was actually just tryng to help other people optimize it by making it more readable.
That looks awesome.
nice delnar :D
If I did not know any better I would think this was a SS thread, as it is sick! :P
Making something less sophisticated sometimes help with the speed.
It's actually slower than in the screenshot, as I turned on power mode in PTI (by pressing the spark plug thingy).
Back on topic, can anybody actually optimize the code snippet? I know Weregoose is holding back on purpose, but is there anyone else who can read the line (other than me)?
c1-->CODE | ec1:(B≠51 and W=2)(55-B→E :not(W)(1+15(B=51))+(W=2)(6-(B-49)+3(B=51)-(B=50))+(B≠49)(4E(W=1)+6-B+3W+(W=3)-14(B<52 and W=3)-10(W=1→Dc2 |
ec2
Kinda ran through it, but I think it would work (can be made to work if not). This would be optimized of: c1 -->CODE | ec1:If W=2 :(B≠51)(55-B→E :not(W)(2(B=53)+3(B=52)+4(B=50)+7(B=51))+(W=2)(1+15(B=51))+(B≠49)((W=1)(4E+53-B)+(W=3)(7-B-14(B<52))+(W=4)(72-B)+(W=5)(75-B)+(W=6)(78-B→Dc2 |
ec2 I know this can be optimized more, I am not too great with long logic :P  .
|
|
|
|
|
|
|
|
|