Author Topic: Call to Programmers  (Read 29622 times)

Offline Solidus117

  • Bot Neophyte
  • *
  • Posts: 4
    • View Profile
Call to Programmers
« Reply #45 on: October 04, 2007, 10:57:18 PM »
I've had academic/project experience with testing procedures and software management. But yeah, I like evaluation before integration, just makes life easier.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #46 on: October 05, 2007, 03:00:44 AM »
I've set up the repository so everything is ignored properly, placed in the right directories, etc.  I've also placed instructions on setting up the code.  Find it all here.

Try to download the repository and compile the code.  Take careful not of anything that seems wrong or hard to set up as you do so, and report them in the Darwinbots3 forum.  I'm going to be doing my best to make easing into coding on Darwinbots3 as easy as possible for whoever wants to do it.

Offline Solidus117

  • Bot Neophyte
  • *
  • Posts: 4
    • View Profile
Call to Programmers
« Reply #47 on: October 06, 2007, 10:44:00 AM »
Quote from: Numsgil
I've set up the repository so everything is ignored properly, placed in the right directories, etc.  I've also placed instructions on setting up the code.  Find it all here.

Try to download the repository and compile the code.  Take careful not of anything that seems wrong or hard to set up as you do so, and report them in the Darwinbots3 forum.  I'm going to be doing my best to make easing into coding on Darwinbots3 as easy as possible for whoever wants to do it.

Sweet. I'll take a look at it a.s.a.p.

I can start working on in about seven weeks time when I get out of my coursework.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #48 on: October 06, 2007, 03:15:40 PM »
Don't stress yourself out too bad.  Darwinbots has a way of sucking up all your available time

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Call to Programmers
« Reply #49 on: May 04, 2008, 03:12:37 AM »
I'm a little thin on spare time at the moment, but I am learning C# and looked at the existing code. I could help out, but I wouldn't know what to do and could only fill in stub classes and methods.
« Last Edit: May 05, 2008, 02:52:51 AM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #50 on: May 04, 2008, 04:22:06 AM »
I could get you started doing something as simple as trying to break the existing code.  It's all unit tested, which is this whole programming paradigm where you try to test every public interface in your class and try to break it, and check its results to make sure it's correct.  So something as simple as writing some more tests to try and break the code would be helpful.  I can't guarantee that all the tests I wrote already are 100% thorough, so it's good to have another brain thinking of ways to break it.

Alternatively the parsing code goes too far with exceptions.  I'd like to replace things like Parse("string") with TryParse("string", ref basepair) that doesn't throw exceptions, and instead just returns a success or fail value.

Both would be pretty straightforward, and get you familiar with a section of the code.
« Last Edit: May 04, 2008, 04:24:50 AM by Numsgil »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Call to Programmers
« Reply #51 on: May 05, 2008, 02:47:53 AM »
Ok, I'll have a crack at it as soon as I finished this extensively thick C# book. I got most of the basics I think, just glossing over to make sure I haven't missed out anything.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Trafalgar

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Call to Programmers
« Reply #52 on: May 05, 2008, 11:09:49 PM »
I really like C# and XNA, however they're not so great for cross-platformness.

Quote from: Numsgil
Don't stress yourself out too bad.  Darwinbots has a way of sucking up all your available time

Of course, I already have enough other projects sucking up all my available time (but one of which is in C# 2.0 and uses XNA 1.0 refresh 1).

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Call to Programmers
« Reply #53 on: May 06, 2008, 01:04:56 AM »
Ok, I'm working my way through the things and trying to find any possible loopholes.
I could implement chromosomes if I knew what they do; they still seem like an unnecessary layer of complexity.
« Last Edit: May 06, 2008, 01:08:13 AM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #54 on: May 06, 2008, 02:24:06 AM »
Chromosomes are separate threads of execution.  The effects of multiple chromosomes get averaged (probably something more complex than just averaging, I'm not sure yet) together into the final memory for the bot.  So if one chromosome tried to do 5 .up store and the second chromosome did -10 .up store, the net result would be a -5 .up store.  The idea being that two haploid bots can "fuse" during lean times in to a single bot.  The original bots' DNA would share control of the new fused bot using the chromosome system like this.

Chromosomes and codules are the "big" features not implemented yet.  I wouldn't recommend tackling them just yet.

BTW, did you get the unit tests to run properly?  I can't remember how well I worked through the installation instructions for the source code on the wiki.

When you're ready to commit changes, let me know and I'll set you up with an SVN account.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Call to Programmers
« Reply #55 on: May 07, 2008, 03:36:30 AM »
I've looked through the unit tests, sealed them off where I thought they were a bit dodgy.
The Chromosome idea seems brilliant to me; I assume that would mean that viruses bias the behaviour instead of rupturing it. It isn't foolproof though; it's easy enough to get around if the variable is amplified.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #56 on: May 07, 2008, 01:51:55 PM »
Right, so I have to think about something better than just an average.  Maybe weight the values somehow.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #57 on: May 07, 2008, 02:02:20 PM »
I'm looking over the changes to the source code you made.  Just a quick couple of notes:

1.  In the random tests, rnd should never return 10.  The range should be 0 to 9, or -9 to 0.  Also add a TODO note: at some point I'll implement a way to seed the random number generator with a specific value, and the rand calls will be deterministic, which will make them easier to test.

2.  I like that you added some extra fizzles tests.

3.  In int ParseLabel(string word, DNA dna), change the function to look like this: bool ParseLabel(string word, ref int value, DNA dna), and have it return true or false depending on if the value was successfully parsed.  And then remove the try/catch block in the function below it and introduce something that checks for true/false.  We want to avoid the case where unknown labels get parsed to 0.  If a label really is unknown, it's a typo on the user's part, and we should be able to catch that and produce a warning or error message for them so they know right away.

Keep at it   I'm impressed how quickly you've figured out the unit tests.
« Last Edit: May 07, 2008, 05:59:34 PM by Numsgil »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Call to Programmers
« Reply #58 on: May 08, 2008, 01:42:39 AM »
I often use the Java version of it, JUnit. It amazed me to see how similar C# and Java are to each other, especially in this regard.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Call to Programmers
« Reply #59 on: May 08, 2008, 02:10:19 AM »
Yeah, I think Microsoft realized that Java was pretty good, but that they'd never have creative control of the language, so they invented their own.  I get the impression that Microsoft has a bit of "it wasn't invented here" syndrome going on.  DirectX vs. OpenGL being a good example.  But they usually do good work after the third or fourth version release, so I guess it all works out for the consumers in the end.