Computer Science Canada

Programming ideas.

Author:  Cinjection [ Tue Jul 12, 2005 10:31 pm ]
Post subject:  Programming ideas.

Some of us programmers are bored, and we need ideas. The thing is, syntax has overwritten the creative side of my brain. So i need help thinking of a nice c++ challange to continue my learning of the language. Thanks.

Author:  [Gandalf] [ Tue Jul 12, 2005 10:41 pm ]
Post subject: 

Do you know OpenGL? If not, why not learn it? Then you could make some pretty good graphics things. Or make a program that encrypts files, or better yet, compresses files. I'm not that creative either, but you can probably do a lot of good stuff with OpenGL. If you know it, make a short animated movie, or better yet, a game Smile.

Hope to see some of these amazing creations soon!

Author:  Cinjection [ Tue Jul 12, 2005 10:47 pm ]
Post subject: 

[Gandalf] wrote:
Hope to see some of these amazing creations soon!


I think i should mention c++ isn't exactly my strongest language. That is a little out of my league....for now.

Author:  wtd [ Tue Jul 12, 2005 11:13 pm ]
Post subject: 

Conway's Game of Life?

Author:  md [ Wed Jul 13, 2005 9:05 am ]
Post subject: 

minesweeper, checkers, chess... all can be done with text; and once you learn some graphics with graphics too

Author:  Martin [ Wed Jul 13, 2005 10:03 am ]
Post subject: 

www.topcoder.com

Author:  MysticVegeta [ Fri Jul 29, 2005 9:12 pm ]
Post subject: 

topcoder uses some "structs" and some other "public" things that just fly over my head. Have to make classes in order to debug a progam Mad

Author:  wtd [ Fri Jul 29, 2005 9:20 pm ]
Post subject: 

MysticVegeta wrote:
topcoder uses some "structs" and some other "public" things that just fly over my head.


Learn them, then.

Author:  zylum [ Fri Jul 29, 2005 11:27 pm ]
Post subject: 

Martin wrote:
www.topcoder.com


hell yeah!

btw, whats your handle and will you be competing in TCO 2005?

Author:  MysticVegeta [ Sat Jul 30, 2005 3:39 pm ]
Post subject: 

wtd wrote:
MysticVegeta wrote:
topcoder uses some "structs" and some other "public" things that just fly over my head.


Learn them, then.


too dumb for that Embarassed

Author:  wtd [ Sat Jul 30, 2005 3:48 pm ]
Post subject: 

MysticVegeta wrote:
wtd wrote:
MysticVegeta wrote:
topcoder uses some "structs" and some other "public" things that just fly over my head.


Learn them, then.


too dumb for that Embarassed


No, you're not.

Author:  bugzpodder [ Sat Jul 30, 2005 8:16 pm ]
Post subject: 

wtd wrote:
MysticVegeta wrote:
wtd wrote:
MysticVegeta wrote:
topcoder uses some "structs" and some other "public" things that just fly over my head.


Learn them, then.


too dumb for that Embarassed


No, you're not.


y not try topcoder, wtd? an hour per week surely is an easy commitment? and you'll get to code in a situation that you dont need to worry about indenting and spaces and variable names Wink and you get to see how horrible other's coding styles are (if you thought mine was bad...). and zylum, dont get too excited Wink Its usually just u and me. my rating is dropping pretty bad these days though. although its not an entirely a bad idea if I keep my rating low and so when it comes to TCO i can get an easy room for the first few rounds and earn some $$$ Wink

Author:  zylum [ Sat Jul 30, 2005 8:22 pm ]
Post subject: 

lol you think your rating is bad? i've only been in div 1 for one srm where i score like 150 points or something and now im back in div 2!!

anyhoo, i dont think wtd would be very good at topcoder. hes more of the "look at my awesome coding style" and "i know the syntax to 20 different laguages" kind of programmer... we're more into the algorithms aspects of programming Wink

Author:  wtd [ Sat Jul 30, 2005 10:07 pm ]
Post subject: 

bugzpodder wrote:
and you'll get to code in a situation that you dont need to worry about indenting and spaces and variable names Wink


The problem is that you think it's a burden to think about this stuff. I like coding like that. I like to take my time, and get it right. Trying to code fast holds very little appeal for me.

Smile

Author:  bugzpodder [ Sun Jul 31, 2005 9:31 am ]
Post subject: 

speed is an issume... but with speed alone wont get you far in the competition. Does solving difficult challenges in a set time frame against the best programmers in the world sounds appealing to you?

Author:  wtd [ Sun Jul 31, 2005 1:43 pm ]
Post subject: 

bugzpodder wrote:
speed is an issume... but with speed alone wont get you far in the competition. Does solving difficult challenges in a set time frame against the best programmers in the world sounds appealing to you?


No. Solving difficult challenges with the best programmers in the world sounds appealing to me.

This is why I've asked for help here with things like creating a viable alternative to Turing for introductory Computer Science education. That's a difficult challenge. Perhaps not in the sense of coding, but it's a difficult challenge nonetheless.

Author:  bugzpodder [ Sun Jul 31, 2005 8:11 pm ]
Post subject: 

hehe... well, if you are looking for world-class programmers, surely you've came to the wrong place Wink

Author:  md [ Sun Jul 31, 2005 9:45 pm ]
Post subject: 

Hey now... I'm world class! I'm even in a class of my own!

Author:  zylum [ Mon Aug 01, 2005 2:42 am ]
Post subject: 

there are also design and development competitions... you might be interested in those.. you can earn lots of cash that way too Wink

Author:  bugzpodder [ Tue Aug 02, 2005 10:27 am ]
Post subject: 

wtd wrote:
bugzpodder wrote:
speed is an issume... but with speed alone wont get you far in the competition. Does solving difficult challenges in a set time frame against the best programmers in the world sounds appealing to you?


No. Solving difficult challenges with the best programmers in the world sounds appealing to me.

This is why I've asked for help here with things like creating a viable alternative to Turing for introductory Computer Science education. That's a difficult challenge. Perhaps not in the sense of coding, but it's a difficult challenge nonetheless.


actually i am quiet fond of the idea of a programming project by memebers at compsci. However, it is usually the case that most such projects will be abandoned due to lack enthusiasm/responsibility midway. Of course, it also doesnt help when all of us have different language preferences and backgrounds. Perhaps some of you remembers projectT Smile www.geocities.com/bugz_podder/projectt.html
just my failed attempt Smile

Author:  [Gandalf] [ Tue Aug 02, 2005 3:57 pm ]
Post subject: 

Heh, a project in Turing... I guess if there were a lot of people working on a project you could get something good done even on Turing (and seeing as how it's the most popular language here...)
Also, I remember that the d-team was making a 3d OpenGL space shooter game, but that stopped being worked on for some reason.

I'm up for a project, but I can only help on varying degrees (depends what language). The Turing modification got pretty far, and I'm inclined to say that it's not dead just temporarily delayed for motivational purposes.

So, what about it? We have quite a few experienced people here, and if everyone joined forces we could make something good! Smile

Author:  [Gandalf] [ Tue Aug 02, 2005 4:07 pm ]
Post subject: 

*edited*

Author:  rizzix [ Tue Aug 02, 2005 4:12 pm ]
Post subject: 

Bah! I've joined a top secret group here in compsci. I can't tell you the name for various reasons... We've lost interest too.. Like we did nothing so far, and i believe more that 6 months have passed....

Seriously with such a small community nothing much is possible. I mean we could start up a project with a few dedicated programmer and the rest can join in and leave whenever they fell like doing so. THis works best in the opensource world. It should work likewise the same here. But, where are those few dedicated fools? Confused

Author:  Hikaru79 [ Tue Aug 02, 2005 4:30 pm ]
Post subject: 

rizzix wrote:
But, where are those few dedicated fools? Confused

Someone called?

Seriously, though, there are a few projects I'd like to do as a group with a bunch of compsci.ca people. I like all of them, but I don't have time to do them alone.

a) A Turing IDE (in Java, prefferably, because the point is to be cross-platform): Yes, wtd, I know the last thing Turing beginners need is an IDE to get lost in, but I want to do it for a few reasons. First, there's no Linux editor for Turing. Second, I want to play with the NetBeans platform (or Eclipse). Third, perhaps, just perhaps, it would encourage some more Turing activity by the more advanced programmers in compsci.ca .

b) Chess Engine . I orginally thought of this as a sort of challenge, but I have a feeling we'd just end up with 3 or 4 entries anyway. So perhaps a collaborative effort? There's lots of interesting things we could experiment with this one. Database parsing for some sort of learning system (pattern recognition based on a database of hundreds of thousands of professional games, which are very very easy to come by), some sort of genetic algorithms, etc.

And, well, I've thought of more at odd times but never really posted about them. I'd like to see something, anything started, but I have this dreadful feeling that its going to flop due to school, work, lack of interest, etc. Sad

Author:  bugzpodder [ Tue Aug 02, 2005 4:42 pm ]
Post subject: 

we have enthusiasm, but lack dedication

IDE is *way* too hard. On a scale of 1 to 100 with 100 being hardest, this is a 95-ish thing. In order to make it, you have to know first how it will work. If you just know how an interface works, thats far from the goal. besides, that also involves writing a turing interpreter... not the easiest thing in the world...

chess engine challenge will get you 0 entries, for sure. collaborative effort doesnt sound too bad... still I wouldnt recommend it.

and an open source community just simply wont work. Reading someone else's source would be a tough enough challenge that few could manage, not to mention making changes.

but seriously though... i doubt it'll work out. I've had a difficult time getting people just to work on our assignments from university (you know who you are Wink ) a week before its due...

Author:  [Gandalf] [ Tue Aug 02, 2005 5:00 pm ]
Post subject: 

Stop the negative thoughts!! We can make this, there just has to be enough input. This isn't and assignment, but a fun project Smile.

Myself, I could add to a Turing IDE, but well... It is hard, and it really wouldn't be worth it (not many people care).

Chess, that I could add a ton to. I started working on a simple chess game yesterday, and so far I have a simple interface done. I plan on adding the rules, checkmate and everything you need, and maybe later an ai (probably just some simple min-max for now).

Author:  Hikaru79 [ Tue Aug 02, 2005 5:14 pm ]
Post subject: 

bugzpodder wrote:
IDE is *way* too hard. On a scale of 1 to 100 with 100 being hardest, this is a 95-ish thing. In order to make it, you have to know first how it will work. If you just know how an interface works, thats far from the goal. besides, that also involves writing a turing interpreter... not the easiest thing in the world...

Well, I was planning on quite a few shortcuts for the IDE. For one, we use the NetBeans or Eclipse platform and build on top of that.

As for the interpreter ... well, that's the iffy part. I was planning on writing to Holt and asking for a stand-alone interpreter, without the editor window, which we could just call. If not, I'm sure that by ordering the Linux version, we could work with that to achieve a similar effect. And anyways, didn't you write a Logo interpreter in grade 11 or 12? You have sk1llz Smile

Author:  bugzpodder [ Tue Aug 02, 2005 7:07 pm ]
Post subject: 

LOGO Interpreter is thrown together using an addon arithmetic parser and a space sensitive command parsing. so its a fake. but i have written a simple c++ parser for one of the classes i had to take in university, but it still doesnt support much (only functions/procedures). ripping off others is an interesting idea. but its gotta be the boring-est task around... especially if you have to read off and unuderstand someone else's source code.

chess is not a bad idea... but the AI is just to darn hard... maybe an easier game should be considered at first.
its not a bad idea to practice a few things with it. for example, instead of just going for a recursive minimax call, maybe considering storing data to disk for example so we could maybe solve connect 4. after all, its much more gratifying to have a connect 4 engine that always wins then a chess engine that anybody could beat.

I am waiting for wtd's inputs. where is he? Confused

Author:  Hikaru79 [ Tue Aug 02, 2005 7:14 pm ]
Post subject: 

bugzpodder wrote:
I am waiting for wtd's inputs. where is he? Confused

He's in the IRC channel. Apparently, he hasn't been able to connect to compsci.ca for the past two days. He says he can't even ping it, it just appears completely offline to him. It's the strangest thing... =/

Author:  [Gandalf] [ Tue Aug 02, 2005 7:25 pm ]
Post subject: 

The problem is, tic-tac-toe isn't really fun when you can just program all the possibilities by hand in a few lines - then (if the person has any brains at all) the game will always be a tie.

Games like chess are good because not only are they challenging and fun (matters on opinion, I know...), but every game is different making programming actually creative in some way. It would be hard, but we would have to start off simply programming the rules in anyway, then for an AI we could use an opening database and then just have some basic min-max tree searching. It would be a sort of, continual improvement project.

Author:  Hikaru79 [ Tue Aug 02, 2005 7:26 pm ]
Post subject: 

[Gandalf] wrote:
The problem is, tic-tac-toe isn't really fun when you can just program all the possibilities by hand in a few lines - then (if the person has any brains at all) the game will always be a tie.

buzpodder suggested Connect-4, not tic-tac-toe. Connect-4 is a much more interesting and strategic game than Tic-tac-toe! Our comp sci class spent more time playing it than doing much of anything else Wink

Author:  bugzpodder [ Tue Aug 02, 2005 8:39 pm ]
Post subject: 

[Gandalf] wrote:
The problem is, tic-tac-toe isn't really fun when you can just program all the possibilities by hand in a few lines - then (if the person has any brains at all) the game will always be a tie.


try my 4x4x4 tic tac toe game... pretty fast for a turing program and still undefeated also Wink

http://www.geocities.com/bugz_podder/ttt.html

connect 4 is pretty easy too... if you want something harder, try five-in-a-row... thats also solved (first player win)
and so is checkers i believe

Author:  Hikaru79 [ Tue Aug 02, 2005 8:42 pm ]
Post subject: 

bugzpodder wrote:
[Gandalf] wrote:
The problem is, tic-tac-toe isn't really fun when you can just program all the possibilities by hand in a few lines - then (if the person has any brains at all) the game will always be a tie.


try my 4x4x4 tic tac toe game... pretty fast for a turing program and still undefeated also Wink

http://www.geocities.com/bugz_podder/ttt.html

connect 4 is pretty easy too... if you want something harder, try five-in-a-row... thats also solved (first player win)
and so is checkers i believe

Hehehe. Undefeated with first move, sounds hard Rolling Eyes

Checkers is not solved -- only one of the openings is, and even that is considered tentative. The project details of Chinook can be found here: http://www.cs.ualberta.ca/~chinook/

And, connect-5? On one of those 19x19 boards (Gomoku)? I doubt that's been solved, the branching factor is absolutely *huge* (almost as large as Go's) and they still have world championships and stuff for it.

Author:  bugzpodder [ Tue Aug 02, 2005 8:51 pm ]
Post subject: 

five-in-a-row = gomoku
it is solved (at least its claimed to be solved)

the same person who solved 4x4x4 tic tac toe (Where i first got the idea from)

i thought chinook solved checkers. i might have recalled something wrong

Author:  [Gandalf] [ Tue Aug 02, 2005 8:57 pm ]
Post subject: 

4x4x4 tictactoe is the same thing. Only the first player can possibly win, but that will not happen if the other player thinks at all. The second player can never win if the player is decent. Never. It's like a 'law' of tictactoe.
Sure, it gets harder to control the bigger the 'board', but the basics are still the same.

Author:  bugzpodder [ Tue Aug 02, 2005 9:04 pm ]
Post subject: 

I dont understand what you are trying to say.

try play against my engine as the first player then and see how many times you can beat it. i am willing to bet that without help you'll lose every game, even though technically its a first player win. Feel free to use the undo option as many times as you like Wink

Author:  [Gandalf] [ Tue Aug 02, 2005 9:18 pm ]
Post subject: 

Well...ok, but what I am saying is that I know that it is humanly harder to follow everything with 4x4x4, but the rules are the same. Your program hasn't lost when being first because it can't lose.

*edit* Dang, it's 4:34am, and I am killing myself over my chess game. I guess it is hard...
Sleeping

Author:  bugzpodder [ Wed Aug 03, 2005 8:59 am ]
Post subject: 

meh... its not like I have built the entire game tree for the game. it's just some ad-hoc heuristics applied that seemed to work well. But I am more interested in making something that creates an entire game tree for connect-4 or this game... this is imperative for a game of chess... you want to make sure you dont re-calculate the same game tree twice in a game (so store it). plus its really difficult to give a weighting to a board unless pieces were traded... even then... (while it is relatively easy for connect-4).
and chessmaster is so good because it has a huge set of opening/closing moves database. we dont have that.

Author:  [Gandalf] [ Wed Aug 03, 2005 2:52 pm ]
Post subject: 

Oh, but I do. I have a move database 1gb big. Optimize that, and you have a nice and quick 100mb's of good openings.
Many chess programs are good because, yes, they have fairly large transposition tables and databases, but that is not the only reason. I don't know how big programs like Chessmaster do it, but that's a massively optimised professional program.

Anyways, yeah, starting with something simpler is a pretty good idea. We can see how much input we get on it and if there's enough, later we can switch to Chess.

Quote:
plus its really difficult to give a weighting to a board unless pieces were traded... even then...

Well, if I understand you correctly, for those moves when pieces aren't traded, thats when it uses the opening book. Once that is finished, it looks ahead and takes into consideration, what pieces will be taken, but also things like how much control of the board you gain, how much you have opened up your pieces, king safety, etc.

Author:  bugzpodder [ Wed Aug 03, 2005 2:55 pm ]
Post subject: 

Quote:
Well, if I understand you correctly, for those moves when pieces aren't traded, thats when it uses the opening book. Once that is finished, it looks ahead and takes into consideration, what pieces will be taken, but also things like how much control of the board you gain, how much you have opened up your pieces, king safety, etc.

exactly why the weighting is difficult


: