Bored and need a coding project

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Sagekilla
Posts: 382
Joined: Fri Aug 21, 2009 1:02 am UTC
Location: Long Island, NY

Bored and need a coding project

Postby Sagekilla » Fri Sep 03, 2010 2:24 am UTC

Hi all,

I'm currently a Junior in college, with a Physics / Computer Science dual major. This past summer I did a summer research internship at my university's physics department (And even got a paper out! e-print: http://arxiv.org/abs/1008.1258).

But, aside from the sorta-programming I did over the summer, it's been a while since I did anything in coding. So I figured I should do a nice coding project. Just something simple and small, but one that I could potentially expand into a much larger project over the coming weeks (or months, years).

Anyone have any ideas for what I could do?

Random tidbit: I'm familiar with C++, Java, C#, Python, and Assembly (In decreasing order of expertise -- Even though assembly is last, I have a fairly decent understanding of it).
http://en.wikipedia.org/wiki/DSV_Alvin#Sinking wrote:Researchers found a cheese sandwich which exhibited no visible signs of decomposition, and was in fact eaten.

fuzzz579
Posts: 3
Joined: Sun Dec 20, 2009 2:58 am UTC

Re: Bored and need a coding project

Postby fuzzz579 » Fri Sep 03, 2010 4:58 am UTC

Depending on your skill level it might be fun to make a roguelike, and you could certainly start out small with a 7 day roguelike (7DRL) but could be expanded into something much larger. If you don't care to write all of the display routines and whatnot yourself then check out libtcod for a nice roguelike library that is at least available in C++, Python, and possibly Java and C# (actually I'm pretty sure there are C# bindings) as well. Also check out RogueBasin for a starting point.

User avatar
Cleverbeans
Posts: 1378
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: Bored and need a coding project

Postby Cleverbeans » Fri Sep 03, 2010 5:57 pm UTC

Write a genetic algorithm create an AI opponent which play sets of 100 paper/rock/scissor games versus various flawed opponents (favors rock, only plays paper, etc.) and converges on a maximally exploitive solution as quickly as possible.
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln

Sagekilla
Posts: 382
Joined: Fri Aug 21, 2009 1:02 am UTC
Location: Long Island, NY

Re: Bored and need a coding project

Postby Sagekilla » Sat Sep 04, 2010 2:38 am UTC

Cleverbeans wrote:Write a genetic algorithm create an AI opponent which play sets of 100 paper/rock/scissor games versus various flawed opponents (favors rock, only plays paper, etc.) and converges on a maximally exploitive solution as quickly as possible.


That sounds like fun. I did try doing a (REALLY simple) genetic algorithm that tried to optimize a given function with a set of constraints, but that there sounds like way more fun.
http://en.wikipedia.org/wiki/DSV_Alvin#Sinking wrote:Researchers found a cheese sandwich which exhibited no visible signs of decomposition, and was in fact eaten.

User avatar
Squid Tamer
Posts: 220
Joined: Fri Apr 03, 2009 3:59 am UTC
Location: Over there
Contact:

Re: Bored and need a coding project

Postby Squid Tamer » Sun Sep 05, 2010 2:54 am UTC

Cleverbeans wrote:Write a genetic algorithm create an AI opponent which play sets of 100 paper/rock/scissor games versus various flawed opponents (favors rock, only plays paper, etc.) and converges on a maximally exploitive solution as quickly as possible.


Woah. You just convinced me to write a 200 line Python Rock-Paper-Scissors game that uses a genetic-algorithm-ish thing to decide on the best strategy to use, and some of the strategies learn from your choice biases and choose the 'attack' that will beat your most common option. It stores every move that you've ever made, strategy weights, and biases in a save file.

Sagekilla
Posts: 382
Joined: Fri Aug 21, 2009 1:02 am UTC
Location: Long Island, NY

Re: Bored and need a coding project

Postby Sagekilla » Sun Sep 05, 2010 3:39 am UTC

Squid Tamer wrote:
Cleverbeans wrote:Write a genetic algorithm create an AI opponent which play sets of 100 paper/rock/scissor games versus various flawed opponents (favors rock, only plays paper, etc.) and converges on a maximally exploitive solution as quickly as possible.


Woah. You just convinced me to write a 200 line Python Rock-Paper-Scissors game that uses a genetic-algorithm-ish thing to decide on the best strategy to use, and some of the strategies learn from your choice biases and choose the 'attack' that will beat your most common option. It stores every move that you've ever made, strategy weights, and biases in a save file.


That actually reminds me, I wrote a Blackjack game with my friend for our last lab in class a year ago. We had it store up to 10 outcomes of every possible hand, and chose it's move based on this dataset. Old outcomes from a particular hand were pushed out in favor of new outcomes, and we used some fixed rules along with this (e.g., if you have 20 we just told it to not even bother hitting, and if it had a 4 then we had it not even consider standing).

The AI wasn't half bad, but the weighting portion of the algorithm needed some more work. We spent the vast majority of our time working on this aspect, but we didn't have nearly enough time to iron things out.
http://en.wikipedia.org/wiki/DSV_Alvin#Sinking wrote:Researchers found a cheese sandwich which exhibited no visible signs of decomposition, and was in fact eaten.

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6582
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: Bored and need a coding project

Postby Thesh » Sun Sep 05, 2010 6:57 am UTC

When I am in between projects, or bored with my current project, I like to solve puzzles. It's a good way to keep yourself sharp.
Summum ius, summa iniuria.

khanh93
Posts: 21
Joined: Wed Jul 21, 2010 10:42 pm UTC

Re: Bored and need a coding project

Postby khanh93 » Sun Sep 05, 2010 6:00 pm UTC

Have you ever taken a look at projecteuler.net?

Killamus
Posts: 163
Joined: Sun Jan 24, 2010 3:26 am UTC

Re: Bored and need a coding project

Postby Killamus » Sun Sep 05, 2010 10:47 pm UTC

If you're going to do Rock Paper Scissors, might as well do Rock, Paper, Scissors, Spock, Snake.

User avatar
sircrayons
Posts: 86
Joined: Wed Mar 10, 2010 3:17 am UTC
Contact:

Re: Bored and need a coding project

Postby sircrayons » Mon Sep 06, 2010 3:42 am UTC

"Ford, you're turning into a penguin. Stop it."

kilik
Posts: 17
Joined: Mon Mar 31, 2008 10:15 pm UTC

Re: Bored and need a coding project

Postby kilik » Mon Sep 06, 2010 12:06 pm UTC

Squid Tamer wrote:Woah. You just convinced me to write a 200 line Python Rock-Paper-Scissors game that uses a genetic-algorithm-ish thing to decide on the best strategy to use, and some of the strategies learn from your choice biases and choose the 'attack' that will beat your most common option. It stores every move that you've ever made, strategy weights, and biases in a save file.


Reminds of me this one RPS bot I've read about where they program a lot of strategies (pure random, pattern analysis of history based on last few moves and what happened when those 1,2,3,4, etc moves happened last and anything else you can think might think of). Then you have at it. It plays with it's "best" algorithm, but then at the end of each play it checks if each algorithm won or lost, and then adjusts their weights. It's kinda nifty cause in RPS you can weight all the algorithms at the same time. Only small issue might be that with a severely limited dataset, different strategies would probably be producing unique, different situations, sorta ruining the advantage of having all that history. But that's fine, as with anything like this, you just get more data (and hell, if the player thinks he is doing well, he very well might give it to you).

Oh and I'd second projecteuler.net. Seeing as this is Randall's sites forum you probably were already familiar with it, but I really enjoyed it when I was learning python.
Alternatively, if you like that sorta AI thing, you may want to try something like a tron clone + AI for it. You don't have to exactly do tron, just that sorta game with a good way to handle switching out human players, and computers is fairly simple (I did it in a hour or two when I was bored and didn't have access to my main computer, just a flashdrive with Eclipse/JDK) and the AI is both simple, and highly complex (you really cannot do things like ideally solve an end game fill with AI, it's fun to see how close you can get though).

User avatar
Squid Tamer
Posts: 220
Joined: Fri Apr 03, 2009 3:59 am UTC
Location: Over there
Contact:

Re: Bored and need a coding project

Postby Squid Tamer » Mon Sep 06, 2010 9:30 pm UTC

kilik wrote:
Squid Tamer wrote:Woah. You just convinced me to write a 200 line Python Rock-Paper-Scissors game that uses a genetic-algorithm-ish thing to decide on the best strategy to use, and some of the strategies learn from your choice biases and choose the 'attack' that will beat your most common option. It stores every move that you've ever made, strategy weights, and biases in a save file.


Reminds of me this one RPS bot I've read about where they program a lot of strategies (pure random, pattern analysis of history based on last few moves and what happened when those 1,2,3,4, etc moves happened last and anything else you can think might think of). Then you have at it. It plays with it's "best" algorithm, but then at the end of each play it checks if each algorithm won or lost, and then adjusts their weights. It's kinda nifty cause in RPS you can weight all the algorithms at the same time. Only small issue might be that with a severely limited dataset, different strategies would probably be producing unique, different situations, sorta ruining the advantage of having all that history. But that's fine, as with anything like this, you just get more data (and hell, if the player thinks he is doing well, he very well might give it to you).


Wow. That works almost exactly like mine does, except that the pattern analysis is a whole lot better on that one. I'm planning to implement a better one, though.

slifin
Posts: 6
Joined: Wed Mar 31, 2010 3:17 am UTC

Re: Bored and need a coding project

Postby slifin » Wed Sep 08, 2010 6:54 pm UTC

I work on a project called somadev, so I apologise if this seems like self promotion

It's a project to resurrect a charming MMO called the myth of soma, we have a old source version of the client and a later compiled version, our coders have been slowly adding features to the source and our main coder has a pretty good emulation of the server if any one is interested I'd advise getting in touch with arcanine on somadev.com, if you want to help out, there's plenty of work that could be done :) for someone interested on working on a MMO project, you can also find us on freenode under #somadev though it's not always being used so you may have to be patient for a reply

User avatar
minno
Posts: 152
Joined: Fri Jul 31, 2009 11:33 pm UTC
Location: Where you least expect it.

Re: Bored and need a coding project

Postby minno » Wed Sep 08, 2010 11:08 pm UTC

If you're interested in a team environment, you can try a website like sourceforge.net and either post a project and ask for help or join a project and help them.
If you fight fire with fire, you'll get twice as burned.

the.coding.eye
Posts: 52
Joined: Thu Apr 16, 2009 4:56 am UTC
Contact:

Re: Bored and need a coding project

Postby the.coding.eye » Thu Sep 09, 2010 3:45 am UTC

A program to simulate and animate a Harmonograph drawing would be cool. Be sure to make it so you can export the drawing in a vector image format. I wrote one the other day for a science project. It actually turned out pretty cool.
"In theory, theory and practice are the same. In practice, they are not."


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 10 guests