|
|
|||||||
============= The Challenge ============= You are to write a UDF that encrypts and decrypts alphanumeric text based on a modified Vigenere Cipher using a cipher table consisting of a group of uppercase alpha letters, lowercase alpha letters, and numbers. The three groups are ordered as follows: 0-9, Z-A, a-z. Thus, the cipher table would consist of the blocks 0-9, Z-A, a-z ordered as "0123456789ZYX ... CBAabc ... xyz" plus the appropriate shifting. Important rule change! The modified Vigenere cipher is defined by the following rules:
A download is available at http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip ============= Specification ============= The Vigenere Cipher -- A Polyalphabetic Cipher One of the main problems with simple substitution ciphers is that they are so vulnerable to frequency analysis. Given a sufficiently large ciphertext, it can easily be broken by mapping the frequency of its letters to the know frequencies of, say, English text. Therefore, to make ciphers more secure, cryptographers have long been interested in developing enciphering techniques that are immune to frequency analysis. One of the most common approaches is to suppress the normal frequency data by using more than one alphabet to encrypt the message. A polyalphabetic substitution cipher involves the use of two or more cipher alphabets. Instead of there being a one-to-one relationship between each letter and its substitute, there is a one-to-many relationship between each letter and its substitutes. The Vigenere Tableau The Vigenere Cipher , proposed by Blaise de Vigenere from the court of Henry III of France in the sixteenth century, is a polyalphabetic substitution based on the following tableau: Code:
Note that each row of the table corresponds to a Caesar Cipher. The first row is a shift of 0; the second is a shift of 1; and the last is a shift of 25. The Vigenere cipher uses this table together with a keyword to encipher a message. For example, suppose we wish to encipher the plaintext message: TO BE OR NOT TO BE THAT IS THE QUESTION using the keyword RELATIONS. We begin by writing the keyword, repeated as many times as necessary, above the plaintext message. To derive the ciphertext using the tableau, for each letter in the plaintext, one finds the intersection of the row given by the corresponding keyword letter and the column given by the plaintext letter itself to pick out the ciphertext letter. Code:
Decipherment of an encrypted message is equally straightforward. One writes the keyword repeatedly above the message: Code:
This time one uses the keyword letter to pick a column of the table and then traces down the column to the row containing the ciphertext letter. The index of that row is the plaintext letter. The strength of the Vigenere cipher against frequency analysis can be seen by examining the above ciphertext. Note that there are 7 'T's in the plaintext message and that they have been encrypted by 'H,' 'L,' 'K,' 'M,' 'G,' 'X,' and 'L' respectively. This successfully masks the frequency characteristics of the English 'T.' One way of looking at this is to notice that each letter of our keyword RELATIONS picks out 1 of the 26 possible substitution alphabets given in the Vigenere tableau. Thus, any message encrypted by a Vigenere cipher is a collection of as many simple substitution ciphers as there are letters in the keyword. Although the Vigenere cipher has all the features of a useful field cipher -- i.e., easily transportable key and tableau, requires no special apparatus, easy to apply, etc. -- it did not catch on in its day. A variation of it, known as the Gronsfeld cipher, did catch on in Germany and was widely used in Central Europe. The Gronsfeld variant used the digits of a keynumber instead of a the letters of keyword, but remained unchanged in all other respects. So in fact the Gronsfeld is a weaker technique than Vigenere since it only uses 10 substitute alphabets (one per digit 0..9) instead of the 26 used by Vigenere. ============= Inputs & Outputs ============= The Vigenere UDF accepts two to three parameters. The first parameter is a string containing the text to be encrypted or decrypted. The second parameter contains the cipher key. The optional thirs parameter, if set to true, indicates that the first string is to be decrypted using the provided cipher key. ======= Scoring ======= All ten provided samples must be correctly encrypted or decrypted to have a valid Vigenere UDF and to have the KiXgolf score count. ============= General rules =============
When posting KiXtart Golf Scores, please include the KIXGOLF_*.TXT file that is created in the script directory. It contains some basic information about the computer that the script is run on and the resulting scores. ======== Deadlines ======== Private coding starts Saturday, July 24, 3pm EST Private coding ends Friday, July 30, 8pm EST Public coding start Friday, July 30, 8pm EST Public coding ends Sunday, August 8, 9pm EST ============ Test program ============ A test program is provided to help screen entries and to provide the Golf Score. Any program that passes the test program can be submitted. If you are surprised that your solution passed the test program, please submit it anyway! That will help me identify bugs in the test program. ================================================================ KiXtart GOLF - How To Play ================================================================ Most importantly, anybody can play, no age restrictions, no penalties, no handicap! The object in "real" golf is to hit the ball in the hole in the fewest strokes. The object in KiXtart Golf is to get from input (tee) to target (hole) in the fewest keystrokes. Example: How many positive elements are in array $a? Array $a could be of structure $a=[1, 2 ,-3, 4, -5, -7, 8, 9] One approach: [CODE]for $b=0 to ubound($a) if $a[$b]>0 $c=$c+1 endif next[/CODE]for a score of 45. Another solution is: [CODE]DO $b=$b+1 if $a[$b]>0 $c=$c+1 endif UNTIL $b>(UBOUND($a)+1)[/CODE]for a score of 53. Better approach: Code sample 1 ================================================================ KiXtart GOLF - The Rules ================================================================ 1) The goal of KiXtart Golf is to score the lowest strokes. 2) Strokes are all characters in a piece of code except whitespace characters, unless the whitespace character is necessary for the line of code to work. Therefore, carriage returns and line feeds do not count or spaces in between the '=' sign when assigning variables, e.g. '$a = $b' scores 5. 3) Code can be constructed any way you like, as long as it is syntactically correct with KiXtart. 4) The final solution MUST pass all test scripts that accompagny the KiXtart golf challenge. 5) The use of '$' as a variable is allowed. 6) In case of questions about a particular way to count the KiXtart Golf Challenge organizer has the last call. 7) During the private coding phase, no code is allowed to be posted. Violations result in disqualification of said player. 8) During the public coding phase, code should be posted, reused, and borrowed from other players. 9) The test script contains the official KiXgolf scoring engine ================================================================ KiXtart GOLF - The Duration of the Competition ================================================================ 1) Private coding phase: From date/time of posting the tournament challenge to Friday, July 30, 8pm EST (BBS+6 time) 2) Public coding phase: From Friday, July 30, 8pm EST (BBS+6 time) to Sunday, August 8, 9pm EST (BBS+6 time) 3) Final results: Sunday, August 8, 9pm EST (BBS+6 time) You will need the complete package from http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip. |
||||||||
|
|
|||||||
Quote: does this mean that we should look for dots? also: Quote: in english, lower case is only used if lower-case letters are found in input. |
||||||||
|
|
|||||||
Quote: I don't know what you look for ;-) However, the rules specify how non-alphanumeric characters in the input streams are to be handled. Quote: Yes, that is correct. |
||||||||
|
|
|||||||
BTW, for those of you who like to analyze the strenghts and weaknesses of the modified Vigenere cipher. The modifications introduce one major flaw which can result in the encrypted text not being decrypted correctly. Special recognition to the person who can name and explain this weakness. However, this flaw will not affect the examples provided in this challenge and you are not required to code around this flaw. |
||||||||
|
|
|||||||
I mean, that your rules says "sentence" does this mean the whole input string, or blocks separated with dots in it. |
||||||||
|
|
|||||||
Generally, a dot '.' is used to separate sentences. However, a dot between two numbers would not indicate a sentence separation but a decimal point. |
||||||||
|
|
|||||||
so, how do we separate the sentences in input text? after all, in your rules it says that the sentences word index has a meaning. |
||||||||
|
|
|||||||
I guess that is part of the challenge. |
||||||||
|
|
|||||||
to understand the rules? so, we fall back to the old debate should the rules and goals be clear for everyone to understand or should we have some quessing also included to make it little bit harder. |
||||||||
|
|
|||||||
I don't really see the problem. At least in the English language, the full stop (dot, '.'), exclamation mark '!', and question mark '?' indicates the end of a sentence, while a space indicates a separation between words. Therefore, having this text fragment "This is sentence one. And this is sentence 2" it is quiet obvious that the dot after the word "one" indicates a full stop and therefore the end of a sentence. |
||||||||
|
|
|||||||
damn. now, this clarified a lot. and, we need to also not search for those characters, we need to separate them from decimal stuff and so on... k, thanks. |
||||||||
|
|
|||||||
next Q. what does mean "word is using shift"? in the vigenere characters are shifted. should we instead shift words (like the rules seems to say)? or should we apply some compination of the real vig and word shifting? |
||||||||
|
|
|||||||
Where did you find "word is using shift" in the rules? In the standard Vigenere cipher, you're using the ciphers that are shifted by one character when you go down the cipher tableu. This is illustrated in the rules. One of the required modifications is that this character shift is based on the position of the word to be encrypted inside it's sentence. Thus the first word's cipher tableau starts with Code:
In case of the second word, the shift would now be two characters, thus Code:
In effect each word inside a sentence to be encrypted is using it's own distinct cipher tableau. |
||||||||
|
|
|||||||
Quote: that reads word is using shift. you must remember that my english didn't come from mothers milk. but, this thing now understood... going forward. got the idea already drafted but no full code yet. |
||||||||
|
|
|||||||
Quote: I know, I believe it's vodka-infused, right? ;-) I'm pretty sure, a couple of people spied on you already and are working on code as we speak :-) So, hurry up! |
||||||||
|
|
|||||||
I know ppl did. and the code already found on the board is half way there. problem now is, how to make that word related shifting happen. the boundaries of my head is again tested. |
||||||||
|
|
|||||||
hmm... not sure of english but doesn't ":" mean end of sentence? heh, should read somewhere the meaning of word "sentence" |
||||||||
|
|
|||||||
also, I wonder why you didn't include any crypted texts to your example. this way the working would have proved easier. now I just need to code a script that does encrypt&decrypt the same way. doesn't still mean it's correct... |
||||||||
|
|
|||||||
k, I'm 90% sure I got the encryption right although validator says success 0%. but that's purely because it does not test neither encryption nor decryption correctness. with encryption only, the size is 591. |
||||||||
|
|
|||||||
hey, is the flaw the fact that you can end up with no small letters in your output even if the original text had them? thus, using wrong decryption "character-set" |
||||||||
|
|
|||||||
k, code working fine until whitespace occurs. after that, totally messed up. even the length is different. |
||||||||
|
|
|||||||
totally out there. anyone had any luck with the multi-word shifting? getting frustrated. can't even see where it gets screwed up. |
||||||||
|
|
|||||||
ahh cool!! i think i got it working, and only took a few extra lines But i do have a question.... the multi work shift? I am not 100% clear on that. Or i am seeing some weird results.. what happens if the shift size is greater than the length of the word? |
||||||||
|
|
|||||||
if someone wants a table for checking the correctness of the data, here is some code for creating the tables for 1st and 2nd word of sentence: Code:
like you can see, the cipher has the clear flaw that with same key char a crypted char may have multiple matches. that makes this cipher theoretically useless. |
||||||||
|
|
|||||||
Time to play, will try to understand the rules and use pen&paper first. Like Schwarzenegger said: I'll be back. |
||||||||
|
|
|||||||
Yeah, Jooel found the flaw. Under certain circumstances, when the plain text contains a lower-case character and the cipher key does not, the resulting output text might not contain lower-case characters. In that case, the decryption routine would only work with a cipher tableau containing numeric and upper-case alpha charatcers and fail to properly decrypt the text. Re: word shift. Just think of each word as it's own little encryption/decryption task with it's own cipher tableau. Since whitespace is passed through the en/de-cryption routines, the output will contain the same number of words as the input. Thus, the way the characters shift from the first cipher tableau to the second cipher tableau are maintained as well. The result is if I for example encrypt "the the", the the first "the" would use the cipher tableau starting as Code:
and the second cipher tableau would start with Code:
Each "the" would end up with it's own decrypted text even though we only used a single cipher key (actually, we did use two, as the definition of the character shift based on the number of words can be considered a second key). BTW, Richard H.s Vigenere UDF is prepared to handle these different cipher tableaus. Quote: The shift should not have any relations to the length of a single word. Each word is encrypted with it's own cipher tableau that is constructed based on the position of the word inside the sentence. |
||||||||
|
|
|||||||
Quote: does not sound correct. the second tableau has no offset defined in the rules so the first row should be identical to the one in the first word. |
||||||||
|
|
|||||||
Yeah, good spot. I'll correct it. Thanks. |
||||||||
|
|
|||||||
This may be obvious, but I want to make sure I understand. Essentially, we are to pass through anything that is not A-Z,a-z,0-9. |
||||||||
|
|
|||||||
jens, not totally sure but this seems to not work at all. not my code but the rules. if you have input string which has in second word "K" and at the same position in the cipher "I", you encrypt it with "M" when you decrypt it, the first "M" in the tableau is for "2" I thought I was messing things up but it is really clearly in the tableau. oh, and this was without lower case with input of: $iRC=vigenere("KIXGOLF KIXGOLF","KIXGOLF") ?? $iRC ???? vigenere($iRC,"KIXGOLF",1) ? if my case proves right, I have good code at 649 strokes. I have been looking at the second word table all night and this is the only conclusion I found why the code fails. do you have any prove that it can work? |
||||||||
|
|
|||||||
Quote: Yes, that is correct. |
||||||||
|
|
|||||||
Quote: What is "crypto"? Are you referring to the "Keyword? Code:
|
||||||||
|
|
|||||||
Crypto=keyword |
||||||||
|
|
|||||||
I guess I have to owe you all an apology. Jooel actually found a problem in the underlying rules with regards to the shifting of letters. when applying the shifts, the cypher table is no longer symmetric, thus one would get ambiguous results during the decryption process. Thus, the decryption process breaks for e.g. the second word. However, here's the remedy. instead of applying the word-number offset to the rows of the cipher table this word-number offset will be applied to the encrypted character, e.g. encrypted character 'A' with word-offset '1' (first word) results in 'B', and encrypted letter 'b' with word-offset '2' (second word) results in 'C'. I put a demo cipher process below. I will also change toe rules to reflect this. Cipher tableau for the second word in a two-word sentence. Code:
keyword : KIXTART plain : KIXTART ciphertext : 62WOMKO keyword : KIXTART ciphertext : 62WOMKO Ciphertext-Offset : 40UMKIM plain : KIXTART |
||||||||
|
|
|||||||
[edit] My shifting altered the entire table so that each word was encrypted with a different table. The entire table shifted by the required offset. By shifting the first row, then processing the the balance of the table, this methodology provides a working solution but was not the exact specification Jens had requested. I therefore am voiding this post as it does not conform to the challenge. [/edit] Hmmm. I seem to have gotten it to work with the original rules. [CODE] KiXtart KiXtart Version = 4.22 KiXforms Version = KiXGolf Script = kixgolf_vigenere.kix Computer OS = Windows 2000 Professional CPU = Intel Pentium III Speed = 848 MHz Memory = 512 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 9 (100%) Processing Start = 2004/07/25 17:24:51.432 Processing End = 2004/07/25 17:25:15.038 Duration = 0000/00/00 00:00:23.605 KiXGolf Score = 853 Thank you for participating in KiXtart Golf! [/CODE] |
||||||||
|
|
|||||||
are you sure?? i had code that was passing with a 100% and a score of 447. But the errors inharrent in the original cipher table, were causing weird decryption errors, and they were starting to drive me nuts. But i could not figure out what was happeneing |
||||||||
|
|
|||||||
I have output the input string and the decoded string. They all match... But after having a beer with Jens and discussing this, I do believe that my code did not implement the the shifting properly. I am revisiting the code now. |
||||||||
|
|
|||||||
lol! jens, not sure do I understand the new ruling so good but I have all work day to think about it before I get home and back coding... |
||||||||
|
|
|||||||
ja, lot simpler. just had to read the rules properly. I have the code for this already at home, just need to get there :@ gladly all you americano's are sleeping |
||||||||
|
|
|||||||
blaah. "? $iValidPercent" is totally useless in your kixgolf.kix removed it. also added: Code: if instr(@scriptexe,"WKIX") just before: Code: exit 0 |
||||||||
|
|
|||||||
I bet the rules are wrong. instead of: Quote: it should be: Quote: |
||||||||
|
|
|||||||
Code:
|
||||||||
|
|
|||||||
Code:
as of now, i am going to say that the "Valid Cipher Ops" portion of the code is broken.... here is a sample output 6SOF 6WT U 3FAI7U 5SJS use "kix golf" to decrypt it. |
||||||||
|
|
|||||||
Processing Start = 2004/07/26 19:45:18.324 Processing End = 2004/07/26 19:45:18.434 Duration = 0000/00/00 00:00:00.110 KiXGolf Score = 645 KiXGolf Score = 644 |
||||||||
|
|
|||||||
Processing Start = 2004/07/26 11:56:32.412 Processing End = 2004/07/26 11:56:32.444 Duration = 0000/00/00 00:00:00.032 KiXGolf Score = 611 |
||||||||
|
|
|||||||
you got all the ten correct already? |
||||||||
|
|
|||||||
KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/26 20:01:30.622 Processing End = 2004/07/26 20:01:30.752 Duration = 0000/00/00 00:00:00.129 KiXGolf Score = 610 [edit] KiXGolf Score = 598 [edit2] KiXGolf Score = 583 [edit3] KiXGolf Score = 568 |
||||||||
|
|
|||||||
damn, found a bug in my code, and maby even a bug in kix... this will effect my score |
||||||||
|
|
|||||||
you talking about iif? me not using it. it actually adds strokes instead of removing them. |
||||||||
|
|
|||||||
KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/26 21:52:35.596 Processing End = 2004/07/26 21:52:35.736 Duration = 0000/00/00 00:00:00.139 KiXGolf Score = 564 Thank you for participating in KiXtart Golf! [edit] KiXGolf Score = 561 [edit2] KiXGolf Score = 552 [edit3] KiXGolf Score = 546 [edit4] KiXGolf Score = 539 me only one doing this? [edit5] KiXGolf Score = 537 [edit6] KiXGolf Score = 534 [edit7] KiXGolf Score = 531 |
||||||||
|
|
|||||||
Code:
bug found and fixed... well not the IIF bug. I am not sure why i am only getting 7 out of 10... but my own testing code is working.... Code:
I don't know if i will be able to get below 600.... |
||||||||
|
|
|||||||
well, while you try: KiXGolf Score = 528 just wonder, if the pasted code is your own, it looks rather the same as the original. nope, it doesn't. you have case-sensitivity turned off. [edit] KiXGolf Score = 525 |
||||||||
|
|
|||||||
I figured since we were not doing the "AaBa01" cipher, case-sensitivity is no longer needed. and the Kixgolf gods are laughing at me.... KiXGolf Score = 600 |
||||||||
|
|
|||||||
eh, what cipher we are not using? case-sensitivity is not needed but as it's in the rules, it is must part. and, you need either lots of "==" or case-sensitivity. remember, the cipher still has to include uppercase&lowercase&numbers. |
||||||||
|
|
|||||||
yes! below 600!! KiXGolf Score = 588 |
||||||||
|
|
|||||||
KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/27 00:16:59.494 Processing End = 2004/07/27 00:16:59.644 Duration = 0000/00/00 00:00:00.149 KiXGolf Score = 517 |
||||||||
|
|
|||||||
Ok, i am very confused on the use of lcase words in the cipher table.... if i am understanding this right, we are not using lcase words for the cipher table, but are to carry the case of a letter through to the finished cipher? Bryce |
||||||||
|
|
|||||||
I thought we were using lcase letters in the cipher table. I personally need to go back and revisit the offset issue. I'm not really using it yet, but i'm still 10 out of 10 correct. |
||||||||
|
|
|||||||
still finding something... KiXGolf Score = 514 KiXGolf Score = 510 KiXGolf Score = 507 |
||||||||
|
|
|||||||
grrr.... i am going backwards!! Code: Tournament = KiXtart Golf: Vigenere Cipher but i got all bugs out of tables i hope.... :P |
||||||||
|
|
|||||||
507 was still quite powerfull, straight forward code but this is already doing lot of unneeded job. saving 2 strokes KiXGolf Score = 505 [edit] was too fast there. after reviewing my code, it had a bug that didn't show up. fixed and the score is 506 [edit] KiXGolf Score = 501 |
||||||||
|
|
|||||||
celebrating this new awesome milestone with totally new reply: Code:
|
||||||||
|
|
|||||||
Still not sure if i'm doing this offset thing right (seems a little pointless). Quote: |
||||||||
|
|
|||||||
why don't you tell how you do it and I can say do you do it wrong btw, I'm having a code with KiXGolf Score = 498 |
||||||||
|
|
|||||||
encrypting - substract offest from final char pos decrypting - add offset to final char pos and the offset is based on the word in the 'sentence'. Anyway, i haven't even started condensing my code yet, which makes me think i'm missing something. If sounds like i'm doing correctly, what's your encrypted word for the first test? Should be the same as mine right? -Eric |
||||||||
|
|
|||||||
well, when encrypting, I add the offset and decrypting=remove it. can't say for the first one but: The Vigenere cipher basic construction is a combination of a Caesar shift combined with a keyword comes out as: gZD QYyXP5ae WJhdVA F3dks FillEnZ6fl5j dr x KLbh2mGqjkB XD i EJewZI eIbpH NqscBrRF 88yT i Globl55 |
||||||||
|
|
|||||||
Just curious, what kind of scoring engine is it if it does not tell if done correctly? Should the test code confirm the validity of everyones code? |
||||||||
|
|
|||||||
the scoring engine has had it's limitations in all tournaments. in this one, I bet jens lacked the time to create a full tester. as if he would have, the bugs found in the rules probably would have not been there. |
||||||||
|
|
|||||||
removed two more strokes and got 100% but checked against the above line and didn't match... |
||||||||
|
|
|||||||
Im really sad that I don't see hoby nor richie here now it seems like I'm doing my own competition in removing each stroke as slow as possible. KiXGolf Score = 497 KiXGolf Score = 494 btw, those who want better testing, you can calculate 1 or 2 of the sentences and add them in the encrypted part of the jens' array (which is empty now) I didn't do that, I had my own tests (like "manual" table matching). but to do like I did, you would already need to have some ready code |
||||||||
|
|
|||||||
http://www.kixtart.org/ubbthreads/showthreaded.php?&Number=122793 |
||||||||
|
|
|||||||
and maciep... please could you tell if you get some information is your code working correctly or not? the above score of yours is more than way ahead of me, so some info would be awesome. |
||||||||
|
|
|||||||
Well i'm not getting the same results as your post above, but i don't think it's the offset. It might be Quote: Haven't take this into cosideration yet. Anyway, won't be able to play with this until after work tonight. |
||||||||
|
|
|||||||
back to the special chars. so, sentence separators: . ! ? and word separators: space, tab, ... ? I have included some but then thought, are they really needed. after all, not all whitespace is word-separator, right? removed tab as a word separator: KiXGolf Score = 490 KiXGolf Score = 488 KiXGolf Score = 481 KiXGolf Score = 478 KiXGolf Score = 468 |
||||||||
|
|
|||||||
my eyes start to hurt... btw, I improved my vigenere checker as instructed above and added a check (if cipher, check that both encryption and decryption match the manually entered values). I got many versions that would have passed the original but failed my check. anyways: KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/27 17:29:09.184 Processing End = 2004/07/27 17:29:09.325 Duration = 0000/00/00 00:00:00.140 KiXGolf Score = 467 Thank you for participating in KiXtart Golf! KiXGolf Score = 465 |
||||||||
|
|
|||||||
hehee... ppl will have hard time trying to improve this cryptic crypter KiXGolf Score = 454 KiXGolf Score = 449 |
||||||||
|
|
|||||||
Well i think my golf score will be going up when i get a chance to get back to this. I definitely need to re-evaluate my white space approach. As of right now, two spaces in a row will increase the offset. Luckily it's only tuesday. |
||||||||
|
|
|||||||
damn it, i keep finding more bugs in kixtart.... |
||||||||
|
|
|||||||
That is one of the benefits of KixGolf. If you find a bug we should document and discuss it then pass it along to Ruud. We have found several kixtart nuances in prior Golf outings. |
||||||||
|
|
|||||||
maciep, I don't think we need to differentiate between multiple whitespaces. the rules don't say anything about that and in formal language, there is no such thing as double space. I wish jens would come back and tell what whitespace we need to take care off. currently, only one that increases the word offset imho is space. |
||||||||
|
|
|||||||
That works for me. so you have '!.?' as sentence seperators and a space as word seperators, right? And just so i'm on the same track as you, if there aren't any lower case letters in either of the parameters, we're not supposed to use the lcase alpha-block in our table, right? Anyway, here's the last run. Code:
|
||||||||
|
|
|||||||
damn you! me at 448 and have no idea where to cut more yep, same rules. |
||||||||
|
|
|||||||
yippee! KiXGolf Score = 432 weird think... removing all the fine kixgolf code and using stupid syntax seems to give lot better results on this golf. [€dit] KiXGolf Score = 430 KiXGolf Score = 427 KiXGolf Score = 424 KiXGolf Score = 423 |
||||||||
|
|
|||||||
Quote: |
||||||||
|
|
|||||||
I got already 2 lot different codes which both come to 423. running soon out of beer and still no idea what the heck to do to beat you. |
||||||||
|
|
|||||||
Don't worry about me, i just realized that i missed this Quote: So my golf score will be going up i'm sure. |
||||||||
|
|
|||||||
bah i give up. With the weird upercase/lcase rules, this is no longer a straight shift cipher. but i did code this Code:
just watch it for a while and it starts to move!!!! |
||||||||
|
|
|||||||
you giving up? hey, not so soon. thanks maciep, now I can go to sleep. been watching the code for hours and been searching for kixtart bug that you must have found... and then you say this. anyway, was nice having you at this level. got some strokes out of my code, thanks to you |
||||||||
|
|
|||||||
Bryce : Yeah, that thing does start moving: Howard: We ended up at "Stock's on 2nd" (definitely recommended) :-) and at the airport for 2 hours today (delayed plane from Philly) :-( I'd also recomend the brewpub, good choice. Jooel: Yes, I was in a hurry to get this KiXgolf started. Howard and I discussed the current KiXgolf over a couple of beers and what my original intentions were with regards to the whole offset business. Unfortunately, Jooel found a bug in the original version, and told me only about 20 minutes before I had to catch a plane, thus the quick fix requiring the shifting of the encrypted letter. I hope, that by now everybody has fiured out what exactly the shifting of the letters is about, essentially within the first word, all letters are shifted by +1 after encryption, e.g. '1' to '2' and '2' to '3', whereas for the decryption it would be -1, thus '2' back to '1'. For the second word, it would be '1' to '3' and so on, and the last characters would circle back to the first, e.g. 'z'+1='0' and 'z'+2='1'. Let me know if you need further clarifications. |
||||||||
|
|
|||||||
KiXtart KiXtart Version = 4.22 KiXforms Version = KiXGolf Script = kixgolf_vigenere.kix Computer OS = Windows 2000 Professional CPU = Intel Pentium III Speed = 848 MHz Memory = 512 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/28 00:12:40.774 Processing End = 2004/07/28 00:12:43.408 Duration = 0000/00/00 00:00:02.634 KiXGolf Score = 472 Thank you for participating in KiXtart Golf! KiXGolf Score = 465 KiXGolf Score = 460 KiXGolf Score = 445 KiXGolf Score = 441 KiXGolf Score = 431 |
||||||||
|
|
|||||||
Really fast you guys. Me got it working on paper... Now to code it. Jens, got a question about the 'sentence' rule. A sentence could also end with a ! or a ?. Must we count for this in this game? |
||||||||
|
|
|||||||
if you read above, he answered to my question which seems very well. taken his answer, yes, we have !, . and ? as sentence separators. beware, in the tester there is not a single multi-sentence tasks so it may give 111% even though that part ain't working. [frustration note] my laptops touchpad broke down. damn... need a reboot... |
||||||||
|
|
|||||||
Lonkero, I just might be able to catch you... Keep checking your review mirror. |
||||||||
|
|
|||||||
this is really weird. I just tried to fall back to some kix 2.32 syntax and got it shorter! Code:
|
||||||||
|
|
|||||||
Ugh! |
||||||||
|
|
|||||||
Crawling back KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/28 13:22:37.949 Processing End = 2004/07/28 13:22:37.980 Duration = 0000/00/00 00:00:00.031 KiXGolf Score = 448 KiXGolf Score = 420 KiXGolf Score = 409 |
||||||||
|
|
|||||||
maciep, you kidding me? just came home and was ready to hit the sack, and now this! |
||||||||
|
|
|||||||
you've got plenty of time. |
||||||||
|
|
|||||||
Bite me! went to really wicked code (see the execution time) KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/29 02:50:12.597 Processing End = 2004/07/29 02:50:13.058 Duration = 0000/00/00 00:00:00.461 KiXGolf Score = 400 |
||||||||
|
|
|||||||
Hehee! it's time to rock KiXGolf Score = 398 |
||||||||
|
|
|||||||
Now this is fun |
||||||||
|
|
|||||||
not really. already missed 2 working days because of this golf and seems like I will miss third too... |
||||||||
|
|
|||||||
glad to have some competition though... wonder where hoby is at... he wasn't that far behind yesterday. |
||||||||
|
|
|||||||
KiXGolf Score = 397 this is getting weird. all those nice little holes in kixtart language syntax. what would we do without them |
||||||||
|
|
|||||||
Still trying... KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/28 21:10:38.530 Processing End = 2004/07/28 21:10:40.773 Duration = 0000/00/00 00:00:02.243 KiXGolf Score = 418 |
||||||||
|
|
|||||||
if we calculate the score with the time, you are 7 hours behind me. and so is your timezone, right? awesome. |
||||||||
|
|
|||||||
KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/28 22:38:58.651 Processing End = 2004/07/28 22:39:00.574 Duration = 0000/00/00 00:00:01.922 KiXGolf Score = 408 KiXGolf Score = 400 KiXGolf Score = 397 WOO HOO!! KiXGolf Score = 389 KiXGolf Score = 388 |
||||||||
|
|
|||||||
:sad: eh, that low and still that fast I must review my code... |
||||||||
|
|
|||||||
bang, out of memory after 2G usage. |
||||||||
|
|
|||||||
can't get it below this: KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/29 15:33:55.717 Processing End = 2004/07/29 15:33:56.308 Duration = 0000/00/00 00:00:00.591 KiXGolf Score = 393 got the counter to 390 but none of my machines could ever compute it. had mem at 5G and still no go, kix crashed with out of mem error |
||||||||
|
|
|||||||
391... you still 3 ahead... will find a way... [edit] k, 390 no more than 3 to be in lead... |
||||||||
|
|
|||||||
Lonkero, I know this lead won't last too long. Just needed to give you a few gray hairs. I know you like to have a challenge. [edit] OOPS - you have no hair... [/edit] |
||||||||
|
|
|||||||
heh. good morning to you too. well, I think I can't strip any chars no more but... so I thought also when I was over 500. |
||||||||
|
|
|||||||
KiXtart |
||||||||
|
|
|||||||
I'm getting there, slow and steady wins the race Quote: |
||||||||
|
|
|||||||
Finally, KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/29 13:28:54.644 Processing End = 2004/07/29 13:28:54.675 Duration = 0000/00/00 00:00:00.031 KiXGolf Score = 381 KiXGolf Score = 379 |
||||||||
|
|
|||||||
damn. I don't understand what magic you boys use. this is so hard for me and it looks like you just drop the chars like it's nothing |
||||||||
|
|
|||||||
Magic is running out. I might be done here KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/29 15:59:14.236 Processing End = 2004/07/29 15:59:14.267 Duration = 0000/00/00 00:00:00.031 KiXGolf Score = 376 |
||||||||
|
|
|||||||
And I'm not even close: Code:
Code passes testscript but not with sentence thingie / word shift in it... Jens, could you check the calculation of the percentage of valid Ops??? Thinking: $iValidPercent=FormatNumber(CDbl($iValid)/$iTotal*100,0) Should be: $iValidPercent=FormatNumber(CDbl($iValid)/($iTotal+1)*100,0) |
||||||||
|
|
|||||||
Update: KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (100%) Processing Start = 2004/07/29 23:00:50.535 Processing End = 2004/07/29 23:00:50.695 Duration = 0000/00/00 00:00:00.160 KiXGolf Score = 621 Jens, is there a way to check if we use word shifting? |
||||||||
|
|
|||||||
Arghhh! How am I suppose to get there!? 376!! Great job! I may be done. Will look a little tonight. |
||||||||
|
|
|||||||
Actually, I may be disqualified as I provided a new shifted table for each letter and not each word. |
||||||||
|
|
|||||||
KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (100%) Processing Start = 2004/07/29 23:21:34.664 Processing End = 2004/07/29 23:21:34.824 Duration = 0000/00/00 00:00:00.159 KiXGolf Score = 569 Thank you for participating in KiXtart Golf! Still no word shift. So doesn't count either I guess... |
||||||||
|
|
|||||||
386, and my andanved tester still approves it. will check closer as the tweak is a weird one. |
||||||||
|
|
|||||||
I think the tester script should be improved a little. talked to mighty-one on msn and it seems that the tester code giving silly false positives is no good. if someone wants to fill in the blanks, be my quest. anyhow, this is the tester I use and even though it only has one block with cipher text included, it already does a good job beeping on errenous translations.
|
||||||||
|
|
|||||||
k, after talking with pat some more, my code will be disqualified. my table is not as rules say. Quote: where I read and coded it as: The three groups are ordered as follows: 0-9, A-Z, a-z. Thus, the cipher table would consist of the blocks 0-9, A-Z, a-z ordered as "0123456789ABC ... XYZabc ... xyz" plus the appropriate shifting. well, I won't be fixing my code for this thing anymore. too much wasted energy just to see there was a catch 21. I surrender. see you boys on public round. |
||||||||
|
|
|||||||
Sorry to hear that Jooel. I have some code you could use to get around that character order issue, but you will have to wait for the public round. |
||||||||
|
|
|||||||
I'll see if I can get the word shift working... |
||||||||
|
|
|||||||
k, now I request for proper cipher text. any will do. I'm pretty sure I'm over my mess up and the new "KiXGolf Score = 432" code should be right with the rules. |
||||||||
|
|
|||||||
well, as everyone seems sleeping, I assume I got everything right with the change. 410 |
||||||||
|
|
|||||||
Not sleeping, just taking a break. I too have to re-evaluate some of my code because i was adding the offset when i should have been subtracting it. and visa versa So i'll take a look at it a little later. |
||||||||
|
|
|||||||
this is exactly what I cried the tester to be better for. ARGH! |
||||||||
|
|
|||||||
btw, dunno about you but in my code the difference between adding and removing is done by the sign |
||||||||
|
|
|||||||
I wish it were that easy, but too much math has been combined for it to be that easy. |
||||||||
|
|
|||||||
I will improve the test suite and provide encrypted intermediate steps so you can test both the encryption and the decryption. Jens |
||||||||
|
|
|||||||
jens, when will you do that? as far as I know, we are running out of time. and I thought I would be spending my evening being relaxed and drinking beer/vodka. |
||||||||
|
|
|||||||
Wasn't able to finish yesterday and won't be home until about 11pm today and off-line between 6pm and 11pm. |
||||||||
|
|
|||||||
so will you extend the private for day or two? |
||||||||
|
|
|||||||
Alright, i believe i have the offset issue worked out now. Here's the last run. KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/30 17:50:18.522 Processing End = 2004/07/30 17:50:18.553 Duration = 0000/00/00 00:00:00.031 KiXGolf Score = 375 |
||||||||
|
|
|||||||
Okay, how about extending the private coding to Sunday 9am EST? This will give me time to improve the test suite and everybody else has some more time to shave off a char or two. |
||||||||
|
|
|||||||
well, the time is ok. but, the tester is needed BEFORE the end. it's kinda useless after that. but thanks for the extra time. now I can drink friday and saturday and start competing during sunday |
||||||||
|
|
|||||||
I'm done for the night. KiXtart Golf Score Tournament = KiXtart Golf: Vigenere Cipher Valid Cipher Ops = 10 (111%) Processing Start = 2004/07/30 20:31:02.039 Processing End = 2004/07/30 20:31:02.070 Duration = 0000/00/00 00:00:00.031 KiXGolf Score = 369 |
||||||||
|
|
|||||||
hmm... seems like I'm going backwards only from now on. KiXGolf Score = 422 |
||||||||
|
|
|||||||
I've updated the package and now have a couple of encrypted interim steps as well. Download at http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip. The package also contains two examples illustrating the encryption and decryption process. I'll be offline until the late evening. Good luck! |
||||||||
|
|
|||||||
Hi guys, Missed the game - looks interesting & i would have liked to participate but I was & still am on vacation. Haven't been on the home computer much in the last few weeks. PS: Jens thanks for the invite. I am looking forward to the next competition! I don't come here as often as I use to because at work my team is cut off from the internet because we are working with confidental information & any access outside the workplace is restricted. |
||||||||
|
|
|||||||
your script is still screwed up. it displays some [censored] in the console before showing the report. and WKIX32 is still not recognized by you. not first tournament where I cry for this... and could have included some info what is wrong. now we have to modify your script if we wanna know. |
||||||||
|
|
|||||||
Can't seem to download the updated package. |
||||||||
|
|
|||||||
remove the last dot from the link. |
||||||||
|
|
|||||||
the tester is not valid. it includes @ in one of the plain texts but does not double it. still, it expects the outcome to be @. |
||||||||
|
|
|||||||
nah, all the failing ciphers seem to be wrong... according to tables anyways. |
||||||||
|
|
|||||||
I did the encoding/decoding manually. Howver, I can redo it and check why it should not be correct. |
||||||||
|
|
|||||||
Also, the first one to post code, please start a new thread, I have to go offline for a while again. |
||||||||
|
|
|||||||
Jooel: I've removed the single '@' sign from the test string, this should no longer cause any problems. I've also manually rechecked the encryption and decryption steps in the two examples I'm providing in the rules. They both check out fine. Please be more specific when you say that something is failing. Finally, I've run the script with WKIX32.EXE as well and cannot see why it shouldn't work. The results text file is being created the same way as with KIX32.EXE. So, what exactly is the problem with using WKIX32? As far as I can tell, the test suite is working correctly and adheres to the rules. The new version with the '@' sign removed can be downloaded at http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip So, time to post your solutions. I'll start a new thread for this purpose. |