Results 1 to 6 of 6

Thread: Hey.. I beat the countdown nerd

  1. #1
    Commander Keen
    Join Date
    Nov 2003
    Location
    217.27.240.214
    Posts
    624
    Thanks
    0
    Thanked
    0 times in 0 posts

    Hey.. I beat the countdown nerd

    Well.. I got a program that 0wns everyone on countdown. You guessed it. I am idling after getting my degree, and there was ABSOLUTELY nothing on tv, and so I saw this british staple show. And got irritated that a spotty git beat me. Don't get mad... get even.

    Hax3d together an anagram generator in java that works quite well. I suppose I just need a better dictionary to improve things - standard usr/bin/words or wherever it is.

    Now all I need to do is figure out the number generator.. darn it. don't really see how that is possible without trying out EVERY possible combination of + - * /, and some kind of range limiter saying that if it gets within 5 of the target it should print out the order, stop calculating this stream, then try another path.

    OR. as I am typing this. How about simply taking the target number, and trying to reach 0 ? hmm.. that seems a bit better.

  2. #2
    Registered+ Zathras's Avatar
    Join Date
    Jul 2003
    Location
    Canary Wharf/Richmond
    Posts
    1,454
    Thanks
    13
    Thanked
    7 times in 4 posts
    Every combination isn't too difficult. I wrote something similar back in GCSE IT using BBC BASIC.

  3. #3
    One skin, two skin......
    Join Date
    Jul 2003
    Location
    Durham
    Posts
    1,705
    Thanks
    0
    Thanked
    1 time in 1 post
    It happens where it isn't possible to get to a particular number with the numbers presented and only + - / * to use.

    You need to work on iteration methinks. This is the kind of stuff those self-evolving computers use and is VERY complicated.

  4. #4
    Commander Keen
    Join Date
    Nov 2003
    Location
    217.27.240.214
    Posts
    624
    Thanks
    0
    Thanked
    0 times in 0 posts
    hey.. I see that your rep is rising rapidly big richard.

    I swear it was ten in the other thread. Plus. I fought that the splelling thing was a fare point.

  5. #5
    Registered+ Zathras's Avatar
    Join Date
    Jul 2003
    Location
    Canary Wharf/Richmond
    Posts
    1,454
    Thanks
    13
    Thanked
    7 times in 4 posts
    Quote Originally Posted by Big RICHARD
    It happens where it isn't possible to get to a particular number with the numbers presented and only + - / * to use.
    So keep a record of the closest number obtained and the expression done.

    You need to work on iteration methinks. This is the kind of stuff those self-evolving computers use and is VERY complicated.
    You need nothing of the sort. There is a strictly finite set of expressions using the Countdown rules and numbers. Give me a few hours and I'll try to pull out my old code. It's on my Acorn which is sans PSU at the mo.

  6. #6
    Commander Keen
    Join Date
    Nov 2003
    Location
    217.27.240.214
    Posts
    624
    Thanks
    0
    Thanked
    0 times in 0 posts
    was postulating that arrays are crap.. Go on. Admit it, you hate the little buggers.

    So I converted it to hashtable which has VERY interesting properties. Works using "containsKey" method. Which is more consice programming. Any inefficiency is cleary outweighed by no longer having to compute signatures ?

    AND. the program now is guaranteed to find any anagram or word that can be constructed from the input characters. Something that was bugging me when I used arrays to get an alphabetical signature, and regular expressions (these two combined seem to be the traditional approach)

    Just bringing this thread to a happy little conclusion.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hey Hey Kids!
    By WoLFe in forum Welcome to HEXUS!
    Replies: 9
    Last Post: 10-08-2003, 12:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •