TI-BASIC Optimization Competition
Published by KermMartian 8 years, 3 months ago (2016-03-16T15:15:04+00:00) | Discuss this article

As the new moderator of our TI-BASIC subforum, Cemetechian PT_ has taken it upon himself to host a semi-official TI-BASIC contest. We're always keen to have our members learn to be the best, most efficient TI-BASIC coders possible, and these kinds of optimization contests are a great way for us to hone our skills. For this contest, there are 5 tasks:
  1. Sorting: Create an algorithm that sorts a list in increasing order, which is both in Ans and L1. Details are in this post.
  2. EOS: Create an algorithm that parses a string with the following characters in it: *-/+^().0123456789sqrt(. Details are in this post.
  3. 24: Given any four numbers, output a string with 4 numbers and any mathematical token that makes 24 if you call expr(). Details are in this post.
  4. Lossless Compression: Write a program to compress and decompress normal English text with these possible characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ_.,. Details are in this post.
  5. Factorization: Given a large number that is the product of two prime numbers, find those two primes. Details are in this post.
As you'd expect, there are a few rules to this contest. Programs will be graded by executing them on a TI-84+CE and recording how much time each program takes. Your score is heavily weighted towards the speed (not size) of your program. The entry with the lowest time for each task earns 70 points, while the other entries get time/best_time*70 points. Size is similar: the smallest program gets 30 points, the others get size/smallest_size*30 points. If you want to get an idea of what the scores are looking like so far, a spreadsheet is available online that is kept updated with the contest's current results. Don't publish your code anywhere before grading is complete, don't ask for help, and don't steal others' work. You don't have to post on Cemetech that you're participating, although it's encouraged. Only pure TI-BASIC code that uses no ASM or hybrid BASIC libraries will be accepted.

Submit your entries by emailing them, in a ZIP file, to basiccompetition@gmail.com . Any entry before March 22th 11:59:59 pm GMT will be accepted, entries after that will be removed. Be sure to provide your Cemetech username in the subject or body of the email so we know who you are! Everyone can submit as many entries as they want, the last one will always be tested. If you have more programs for a task, please say which program is the main.

The winner(s) of the contest will earn honor, glory, and renown as masters of TI-BASIC and optimization. They'll also get official contest winner Cemetech userbars to proudly display in their signatures. So what are you waiting for? Get cracking on your contest entries if you haven't already; you have slightly less than a week to complete them. If you have any questions, feel free to ask them in this thread or in the original discussion thread. Good luck!