Finally broke the seal
Join Date: May 2004
|
this is kind of an idea was mentioend in a thread in the suggestions forum by your's truly. pardon the lameness of this particular challenge, but if we get a fair number of people participating, i or someone else, can come up with better ones. the idea is like this: a programming idea is presented, in general terms, and the membership has to try and implement it. winner gets to wear the "i won the contest" hat*. if possible, the challenge should be vague enough that people can approach it from any programming language they are familiar with. you lose points and credit if you cheat (like googling src code), but you are encouraged to discuss possible ideas and solutions with the membership.
so, ai, heres your first 'project challenge'. implement the game "31". if you are unfamiliar, it works like this: a matrix (two dimensional array, in this case 6x6) of the numbers 1->6 is created (each duplicated 6 times across), and presented to the users. two users (or user and computer, implementor's choice) alternate selecting a number from the list. after the number is picked, its removed from the options (note: so each number [1->6] can be picked 6 times). the running sum of the selected numbers is maintained as well (preferably visible to the user). the person who makes the total exactly equal "31" wins. if a user pushes the total over 31, they lose. under 31, and the game continues. (yes the game is incredibly lame, but so is my creativity.) extra poitns to whomever can make a computer who can't win (cuz who wants to lose?). and even more brownie points to whoever can make the computer unbeatable. also, you can try making 6x5, 5x5, or nxm versions, possibly with different end totals. here's an example: i go first and pick 6. cpu goes and picks 1 (total=7). i do 5, cpu does 6. (total 18). i do 6, cpu does 6 (30). i do 1 (total=31). i win. oh boy, that was fun! edit: submitters can optionally make binaries/run-only versions of the code available to the public (i can host em if you like), but source should be submitted to the judge panel (for now, i am the judge panel. if anyone would like to join our illustrious group, pm me). try not to give away the answer until the contest is declared closed. and don't be dissuaded if someone beats you to finishing, cuz you could do it in another language, or do one of the bonus challenges. edit #2: submitters should put their tarballed (.tar.bz2 or .tar.gz**), or .zip'd, submissions into my ftp site. its not up 24/7, but damn near most of the time. ftp://thuhfreak.isa-geek.com. you can put anything for a username, if asked. it shouldn't ask for a password. when you upload, your file(s) will be magically scooped away to some far off land (the judging area), then an empty file will be put in their place. if an empty file doesn't appear after your upload is done, pm me. or if there are any problems, pm me. oh, and please dont hack my poor little ftp server. edit #3: deadline. i think friday at noon (EDT, which is -4 GMT) is a good cutoff, to make sure this doens't last forever. * hat not included, nor will it be furnished by thuh Freak. also, hat should be released to the next winner of the next challenge. maybe instead of a hat, we could use the member status dealie. ** if you are unfamiliar with 'tarballing', it goes like this: put everything you want to give away into a folder. for example, the "tarball" folder, and put it in your home directory. open up Terminal.app, and open a new window. type in: Code:
cd; tar c tarball > tarball.tar replacing 'tarball' in the above with your foldername. now you have a "Taped ARchive". next step is compression. Code:
cd; bzip2 tarball.tar #OR
cd; gzip tarball.tar bzip2 will take longer, but will make a more highly compressed file (not noticeable, generally, for small files). after running tar and bzip2, you have a file named "tarball.tar.bz2" (or "tarball.tar.gz" if you did tar and gzip). send that file to me for submission.note: the previous stpes may require the BSD subsystem, or some other configurably removeable part of the os. I know that the tar, bzip2 and gzip programs are all available through fink, if you don't have them. Last edited by thuh Freak : 2004-05-25 at 13:00. Reason: update to contest rools |
quote |
Member
Join Date: May 2004
Location:
|
XXXXX
Last edited by AirSluf : 2004-11-15 at 22:53. |
quote |
Member
|
When is the deadline? I would enter, but I'm up to my nose in code for a word processor I'm writing. If the deadline isn't too soon, though, I may give it a shot.
"I understand small business growth. I was one." - George W. Bush |
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
http://ga.rgoyle.com
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
|
Coolies. This is the exact type of idea I need to build up my coding. I will try and do this as a cocoa app, but if interest is a bit slow to start I will make it as a php web page.
OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available! |
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
Anybody have a link to a free C/C++ code obfuscator?
|
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
Alright, I'm trying it out. I like puzzles and contests.
One question: who wins if there's no possible move? Like, for example, if the total is 30 and there aren't any more 1's to choose. edit: Oh wait. Never mind. I see. The next player would be forced to make the total greater than 31 and they would lose. Ugh. |
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
hint: a good strategy, like maybe for the unbeatable computer version, would be to look ahead one move and make sure that your opponent will put you within range of 31; another might be that you can put him so close to 31, yet can't hit it exactly. personally, i like the satisfaction of when i hit 31, rather than when my opponent goes over, but either win is acceptable in the rules. |
|
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
I was about to post my initial stab, but I think we need a system for naming our entries first (binaries, source folders, whatever). Otherwise we'll have a bunch of "aichallenge1"'s (and the like) posted.
I was thinking along the lines of using our AI names followed by some indication of which challenge it is. Like, for me, on this challenge "spotcatbug_1" or "spotcatbug_AI1". Also, is anybody else trying this? I don't want to be the only one. Ugh. |
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
naming convention sounds like a good idea. how about ai name, then challenge name (31), then submission number (incase someone submits future versions, potentially for the bonus challenges). so "thuhFreak_31_1", and underscores are interchangeable with spaces. i prefer for submissions to be tarballed (.tar.bz2 or .tar.gz), and hopefully have a folder at the top level with sources/binaries inside. your ai name should be near the top of the source files as well. i'm going to setup an anonymous ftp server, where people can make submissions. i'll update the top message when its in place. |
|
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
Quote:
Ugh. |
|
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
Ok, here's the binary for my first attempt. It's a command line app (should be able to just double-click and it'll launch in the terminal).
I don't know if the computer is unbeatable, but I think it's pretty good. I haven't been able to beat it yet. edit: I added the ability to change the computer's intentions from "try to win" to "try to lose." edit2: I didn't switch to the "Deployment" build style in Xcode. This binary works. Ugh. Last edited by spotcatbug : 2004-05-26 at 09:12. Reason: submission 3 |
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
Member
Join Date: May 2004
Location:
|
XXXXX
Last edited by AirSluf : 2004-11-15 at 22:55. |
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
i was wondering, aside from the lameness of the challenge, do you guys feel it was too easy, too hard, just right? disrespective of the difficulty, do you feel like you have enough time, too much time? i got a pretty crafty next challenge lined up, and i was thinking it'll be like a one day event, instead of most of a week. but i don't know if its beneath or above you guys. (thinking aloud...) maybe for the next one i'll try to do a few concurrent challenges, with various difficulties and deadlines. and i'll see which one gets more action. |
|
quote |
Member
Join Date: May 2004
Location:
|
XXXXX
Last edited by AirSluf : 2004-11-15 at 22:53. |
quote |
Member
Join Date: May 2004
Location:
|
XXXXX
Last edited by AirSluf : 2004-11-15 at 22:48. |
quote |
http://ga.rgoyle.com
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
|
I am on page 58 of my "Beginners Guide to C". Will I get extra points if I actually make a working submission by tomorrow afternoon? (I don't even know how to define an array yet!)
OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available! |
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
Quote:
Ugh. |
|
quote |
Veteran Member
Join Date: May 2004
Location: Promise Land of Trustafarians
|
Its a little late, where I live at least, but here's my submission:
http://homepage.mac.com/ryantann/cubedude_31.py Its in Python, because I heard that it was an easy language to start with. It can be run from the Terminal with(if its in your home folder) "python cubedude_31.py" It isn't much, as this is my first real project. All I've done before this is simple stuff like the quadratic formula and other various equations. For example, my submission doesn't allow the computer to be an opponent, or even make a distiction between Player 1 and 2. |
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
I've got next week off. More challenges, please!
|
quote |
Finally broke the seal
Join Date: May 2004
|
The results are in: spotcatbug is the winner for the first ever semi-regular AI.org Project Challenge. i'm going to post to the 'member status' thread as soon as i'm done here. horray for scb! spotcatbug was the first submitter to send in a working rendition of the "31" game, with nearly-perfect ai. the challenge was actually a trick, there is no way to guarantee a win, if the first person knows what they are doing. and fyi, to win at 31, a person should pass the turn back to their opponent with the following totals: 3, 10, 17, 24, 31. if the first player starts at 3, and doesn't stray from those, he'll win. if either player ever strays from those numbers, their opponent can pick it up from there and win. thanks to all the contestants (all three of you ). sorry i didn't post earlier. i had checked in every couple of hours and the site was down.
And, as promised, I have more than one challenge prepared for ya'll. The first one, we'll call it "Age", has a language requirement. i broke one of my own damned rools. but i like this one, and it wouldn't be as challenging if it was language-agnostic. if you don't know sql (or any of its variants), i recommend reading one of the numerous tutorials out there on the web. ok, now the "Age" challenge: you have a table "People", with columns "Name" (varchar 50), and "Age" (smallint). There are 4 records in there, as follows: Laura:15, Jane:20, Bob:10, Nickie:17. try to find, in the simplest, shortest, most efficient, quickest or just any old way that works, a sql query that will return the oldest person's name. and you can't just hard code the name, like "select name from people where name='jane';". your query has to be able to find the oldest person even if i remove jane from the table, or add an older person (or people) to the table. also, you are only allowed to return the oldest person's name (no more, no less; just one record). for this challenge, don't put the answer anywhere public. you can post it to my ftp server (its not up right now, but should be in less than an hour). the simul-challenge this week is called "Monty Hall", or "MH" for short (when you make your submissions). i've mentioned it once or twice before back at the old ai, so you may have heard of it from me already; or perhaps you've heard of this problem on your own adventures. the idea is this: 3 doors are presented to the user. behind two doors are "zonks", basically they are loser doors. one door has the grand prize (in our game, the grand prize is just +1 on their score; and a zonk is no change). the user selects a door. but to twist the game a bit, at this point Monty Hall opens one of the doors (NOT the one the user selected, AND NOT the grand prize; thus it is ALWAYS a zonk) and says to the user "look, this one is a zonk. would you like to change your answer?" as math would have it, the user has a 66 2/3% of being right if they change at that middle junction. your challenge, should you choose to accept it, is to create a comptuer simulation of the Monty Hall problem. the submission should have two play modes: live and statistic (or your implementation can do either). in live mode, the user selects a door, a zonk is revelaed and the user gets to rechoose or stick to their answer; score should be maintained and be visible when the user wants it, as well as the total number of live games. in statistic mode, the user says how many times to run the game, and the computer acts in the player's place: randomly selects a door, a zonk is revealed by Monty, and then always changes their selection. a count should be maintained of how many successes, and failures, and percentages should be made available. note: in both live and statistic modes, the prize door should be randomly chosen before the game starts, and prize behind the doors doesn't move once its been selected (until the next round begins). also, in statistic mode, the computer shouldn't cheat . a good measure of how good your statistic mode will be the proximity to 66.666% as more iterations are done. for this challenge, you can post binaries in public, but try to keep source code hidden (ie, just on my ftp server, or in PMs). there are no restrictions on language for the MH problem. both of these challenges are due Friday at noon (Eastern Daylight Time) again. |
quote |
Veteran Member
Join Date: May 2004
Location: Clayton, NC
|
This thread is still alive.
My Monty Hall submission is here. I did it as an applet, so you can try it just by clicking that link. The interface is sorta not laid-out too nice, but should be easy to figure out. P.S. Does anybody know why the background of the applet is brushed metal? Ugh. |
quote |
Unique Like Everyone Else
|
Aw cmon thuh Freak, Your first challenge could be done entirely with a select statement. You gotta post something a bit more challenging than that.
|
quote |
25 chars of wasted space.
|
Quote:
|
|
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
Unique Like Everyone Else
|
Yeah its funny because when I first read it I expected it to be all complicated so in my head I immediately started picturing the structure of the code with arrays and whatnot but then as I was typing it out I was like oh duh.
WARNING: Do not let Dr. Mario touch your genitals. He is not a real doctor. |
quote |
Posting Rules | Navigation |
|
Thread Tools | |