Author Topic: [CHALLENGE]Logic and Optimization  (Read 31479 times)

0 Members and 1 Guest are viewing this topic.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [CHALLENGE]Logic and Optimization
« Reply #75 on: January 21, 2011, 09:04:47 pm »
Nice, Calc84maniac!

If I have time I'll try to come up with a Tic-Tac-Toe game to your challenge specifications but no promise.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #76 on: January 21, 2011, 09:05:34 pm »
It's fun! I think I can optimise my TTT game a little more though...

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [CHALLENGE]Logic and Optimization
« Reply #77 on: January 21, 2011, 10:15:30 pm »
How big is it currently so we know what to try to beat?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #78 on: January 21, 2011, 10:54:57 pm »
Oh, jeez, my calc just crashed, sorry. I think it was around 600 bytes. I could be wrong. I'll get it back again after I finish a mini project for a friend. (My calc screen is flipped upside down for some reason! It was a mistake, but still!)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #79 on: January 22, 2011, 01:58:59 am »
Oh, jeez, my calc just crashed, sorry. I think it was around 600 bytes. I could be wrong. I'll get it back again after I finish a mini project for a friend. (My calc screen is flipped upside down for some reason! It was a mistake, but still!)
I've seen this happen before. Not to get technical, but this happened to me when I was running some asm code to put my lcd in test mode. I'm not entirely sure what happened, but I suspect the x auto decrement was swiched on by accident  causing everything drawn to the screen to be drawn upside down. This is true if the very top row of your lcd looks normal. If you take a battery out and put back in, then your calc should be fine.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #80 on: January 22, 2011, 02:01:33 am »
We figured out what was wrong... On my 84+SE, the display Driver is slightly different in that sending a value from 0C to 0F causes the screen to flip in some way (even if you RAM clear). I made blue scale when I learned about that :D

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [CHALLENGE]Logic and Optimization
« Reply #81 on: January 22, 2011, 02:29:54 pm »
There is a topic somewhere about screen flipping with an app (CalcSys I think) so ya. But glad you got it figured out.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #82 on: May 01, 2012, 04:21:33 pm »
So, binary base to base 10 conversion, who's up for it? ^_^
Input: Str1 is the binary string
Output: Decimal value in Ans (not a string).

My first attempt is 30 bytes >.> (of code)

EDIT: Also, the string should work like this:
101=5
000101=5
101000=40
EDIT2: I should show the code >.>
Code: [Select]
0
For(A,1,length(Str1
2Ans+(sub(Str1,A,1)="1
End

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #83 on: May 01, 2012, 04:56:29 pm »
I was able to do 25 bytes, but my input string is backwards, and it takes Ans as the string input instead of Str1 D:  It also has the benefit of being a single line

Code: [Select]
.5sum(seq(expr(sub(Ans,X,1))2^X,X,1,length(Ans
Your program can be simplified with the use of expr() as well, instead of the ="1

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #84 on: May 01, 2012, 05:07:59 pm »
Hehe awesome :D I attempted to make it almost exactly that one line code until I realised the string would be backwards.
Code: [Select]
0
For(A,1,length(Str1
2Ans+expr(sub(Str1,A,1
End
27 bytes XD

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #85 on: May 01, 2012, 11:54:47 pm »
I was able to do 25 bytes, but my input string is backwards, and it takes Ans as the string input instead of Str1 D:  It also has the benefit of being a single line

Code: [Select]
.5sum(seq(expr(sub(Ans,X,1))2^X,X,1,length(Ans
Your program can be simplified with the use of expr() as well, instead of the ="1
I'm scared of what TI-BASIC can do sometimes O.o
Sig wipe!