Author Topic: DB3 progress and networking  (Read 2320 times)

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
DB3 progress and networking
« on: March 22, 2015, 08:21:13 AM »
(I've split the topic off from a discussion in this topic) - Numsgil.

DB3 - Could you give us a new wiki page which is a jargon free (or as jargon free as possible) list of the things done in DB3 or partially done...Especially things like the commands that are input to the DNA (so the language for the DNA). I do hope your using a relatively fresh language for the DNA, possibly with backwards compatibility to the old language so the old bots can still jump about in DB3. I mean, the DB2lang is really messy. A lot of the commands are illogical, like ABS being NOT, what is ABS meant to litterally mean? I thought abs were your chest muscles, not a not statement.
« Last Edit: April 03, 2015, 12:56:38 PM by Numsgil »
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: DB3 progress
« Reply #1 on: March 22, 2015, 09:55:05 AM »
abs is the absolute value from 0. so if you have a positive number then it will stay the same, but if you have a negative number it will be turned to a positive number

0 abs = 0
x abs = 1
-x abs = 1

usually it is used for conditionless bots.

do you ever read the definitions and examples? the db code isn't messy, you just don't know everything that you should to be able to read it properly. that takes time but you have to read and test yourself a bit. why do you think i take so long on some things you give me, to give you time to come up with something yourself. it took me over a month of reading and testing to finally get it all, but i didn't give up on trying to understand.
« Last Edit: March 22, 2015, 10:06:25 AM by Shadowgod2 »

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #2 on: March 23, 2015, 12:32:08 PM »
abs is the absolute value from 0. so if you have a positive number then it will stay the same, but if you have a negative number it will be turned to a positive number

0 abs = 0
x abs = 1
-x abs = 1

usually it is used for conditionless bots.

do you ever read the definitions and examples? the db code isn't messy, you just don't know everything that you should to be able to read it properly. that takes time but you have to read and test yourself a bit. why do you think i take so long on some things you give me, to give you time to come up with something yourself. it took me over a month of reading and testing to finally get it all, but i didn't give up on trying to understand.
And most of the things I try a lot on, especially before asking, it makes sense now the Abs, but elsewhere its been explained in ways, among other things in DB code, which make it seem messy. Plus, even messy code you can eventually understand, some of the biggest programming languages have inefficiencies and parts which are messy, take JAVA for example, when you run a program, it'll tell you that you have an error, but unlike python and such won't tell you where the error is. With java, good lord, everythings forced to be so long and thousands and thousands of lines of code are needed for simple programs, 1 error, not a clue where it is, not a clue what the error is. A mere inefficiency. The more efficient, and easy DB code is, the better for new people coming on. Plus, if the programming is easy then it could help people that don't know much about DNA and such understand it more, as even though its not perfect to real life, its probably one of the best, if not the best open source, free simulators out there. Then to top it off, the more simplistic the code for darwinbots the better, as DNA is made up of 4 bases, its that simple, of course we couldn't right in that easily (unless your steven hawkins maybe?) so it needs to be abbreviated into common, or relatively quick to work out, and well explained abbreviations, and commands. These commands then need multiple assets able to be given to them, thus when combined with other commands or operators, and intergers it can perform an almost endless array of tasks.

I mean, even numsigl has said that some bits of the code for DB2 is messy, and thats why he doesn't want to work on it, and instead wants to work on DB3. Both DNA side, and console side.

A FINAL POINT: Numsigl, considering your now hired by google, couldn't you get their interest in DB3 by stating that its an educational platform which can also help train skills, as it helps people understand programming more (Especially assembly language programming as DB2 is currently quite close to) and helps people understand biology, cellular life, the challenges of cellular life, methods that can be used by cellular life, the functions they can perform & how DNA works. then you could do multiple things, like you could get a small (very small :3) chunk of the google servers to run IM or such off (and because its google, they could solve port issues and such :3) and you could grab a few google nerds to help you on this (some other people at google must be interested).
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: DB3 progress
« Reply #3 on: March 23, 2015, 09:53:26 PM »
DB3 - Could you give us a new wiki page which is a jargon free (or as jargon free as possible) list of the things done in DB3 or partially done...

I'm still in day 1, creating the heavens and the earth.  Although it doesn't mention when God created the physics of the universe; that might be more like a day 0 thing.  I'm definitely not as far as separating the light from the darkness.

Also, the wiki is a pretty good resource if you don't understand what something is trying to do. eg: abs.
« Last Edit: March 23, 2015, 09:57:47 PM by Numsgil »

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #4 on: March 24, 2015, 01:26:42 PM »
Still, It'd be good to have a wiki page, just so we can see. If we've got a nice detailed jargon free list of things done, then we can help do solving of problems, and suggestions without even knowing the actual code.

--Or atleast some of us might be able to, It's like with java, I can't program in it, yet I can explain exactly what system to use for a complicated task to a java programmer? The world is a mysterious place indeed.


Anyway, you should look for some pals at google that want to help, then you can have 1 person doing physics, 1 person doing displaywork, 1 person doing option toggle stuff, 1 person writing the user-side code, 1 person putting in the direct bot functions. Splitting it into tasks makes it much easier :P What language are you doing it in?
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: DB3 progress
« Reply #5 on: March 24, 2015, 10:33:55 PM »
It's like with java, I can't program in it, yet I can explain exactly what system to use for a complicated task to a java programmer? The world is a mysterious place indeed.

Hmm, are you familiar with the Dunning-Kruger effect?

Quote
What language are you doing it in?

Let's play a little scavenger hunt type game and see if you can find the answer  :)  I'll give you a hint in the form of a limerick:

There once was a Darwinbots user
The wiki-- it could not confuse her
For in its bright pages
The words of the sages
Something Something read the wiki

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #6 on: March 25, 2015, 12:38:34 PM »
Hmm, are you familiar with the Dunning-Kruger effect?
I wasn't familiar with the Dunning-Kruger Effect, by that name, but most people would notice that. A biased viewpoint of ones self.
Anyway, Im not sure, It seems by every simple-level test that I should be able to make some magnificent program, yet give me something to write it in, and well, it goes kaput. Hmm, its a bit like a quote from jurassic park really...Do you remember "I think little boys are born wanting to be one of two things, astronomers or astronauts" where he says, some of them will want to watch from the safe, far away. Stating whats happening, or happened but never actually being there, or being there, in the danger actually being right in the action.

Let's play a little scavenger hunt type game and see if you can find the answer  :)  I'll give you a hint in the form of a limerick:

There once was a Darwinbots user
The wiki-- it could not confuse her
For in its bright pages
The words of the sages
Something Something read the wiki
Nice Limerick. C#
I've not done C# before, but some point later this year in computer science we should be learning it, so I'll have an early shot at it. -Just hoping you've programmed it modular.ly-

Also, random fact: You never actually go to www.darwinbots.com as you actually go to www.darwinbots.com.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: DB3 progress
« Reply #7 on: March 25, 2015, 03:55:56 PM »
-Just hoping you've programmed it modular.ly-

You can browse the source here: svn.darwinbots.com/Darwinbots3 or there's a nice web interface here: http://websvn.darwinbots.com/listing.php?repname=Darwinbots3&path=%2FTrunk%2FModules%2F&#a6326297d44805def74d70f2afb501a33.  Short answer: it's very modular.  There's a lot of "About This Folder.txt" files that you can read to get an idea of what the modules actually are supposed to do.

In terms of progress, I'm still pretty much where I was when I wrote this (life's been busy and all).

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #8 on: March 26, 2015, 12:02:48 PM »
-Just hoping you've programmed it modular.ly-

You can browse the source here: svn.darwinbots.com/Darwinbots3 or there's a nice web interface here: http://websvn.darwinbots.com/listing.php?repname=Darwinbots3&path=%2FTrunk%2FModules%2F&#a6326297d44805def74d70f2afb501a33.  Short answer: it's very modular.  There's a lot of "About This Folder.txt" files that you can read to get an idea of what the modules actually are supposed to do.

In terms of progress, I'm still pretty much where I was when I wrote this (life's been busy and all).
I may a lot more give very technical details on systems to do some of the modules if I can't grapple C#
The web interface is a lot nicer (times new roman -> killed me)
Do you know any good tutorials etc. for C#
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #9 on: March 26, 2015, 12:09:28 PM »
or there's a nice web interface here: http://websvn.darwinbots.com/listing.php?repname=Darwinbots3&path=%2FTrunk%2FModules%2F&#a6326297d44805def74d70f2afb501a33
I might ask, how can I edit things on that link, Im thinking of first adding some notes in the networking module. I might be able to devise something there. Primarily including port arrays hopefully.
[Definition] "Port Arrays" & "Port Array Teaming" - Port arrays are a specific pattern of ports, used to connect. This is beneficial over one port as if the specific port you connect via is blocked, a port array can divert to the unblocked ports, partially because it can be returned a ping to inform it of the successful ports. If multiple get through it can be teamed to allow stress on the ports to be alieviated so other programs can also get though.


That should help on what I mean.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: DB3 progress
« Reply #10 on: March 26, 2015, 01:34:12 PM »
Do you know any good tutorials etc. for C#

I picked it up pretty easily just by trying to make it do stuff I needed, but then I already knew C++ very well.  If you don't really know a programming language yet it's going to be much harder.  I learned to program on the ancient C For Dummies series of books, but that was way back in the 90s.  I'm not sure what people use these days.  But if there's one question I'm sure the internet can answer it's where to find resources for learning to program.

Quote
I might ask, how can I edit things on that link

You don't; it's a read only look at the repository.  If you want to make changes, you have to grab the repository and tools and make SVN patches (again, that DB3 link in the wiki is pretty explicit about how to set it all up).

Quote
I'm thinking of first adding some notes in the networking module.

Any work around networking is going to be premature, as I don't have answers to even very basic questions like TCP or UDP.  (UDP is traditionally what games use, but our multiplayer model in DB2 is very asynchronous and involves mostly sending largish bot files sporadically, so a simple TCP or web service interface might be better, but then maybe I want to do something more clever than what DB2 does).  Or how I'm going to serialize anything.

As a beginner programmer the code base is going to be pretty frightening.  You have to learn about things like unit testing and SVN patches, and most of the code is numerical algorithms for linear algebra, computational geometry, or DirectX shader code.  That said, the Sunweaver module (the DNA basically) is self contained and pretty straightforward, so it might be a good place to poke around.

There's just not a lot of low hanging fruit left.  If it was easy, I've already done it, or it's so far in the future that it doesn't matter yet.  Not to be discouraging!  I like when people help.  Just don't expect to pick up the code and make meaningful contributions if you've never worked on a large (for some definition of large :)) code base before.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #11 on: March 27, 2015, 12:33:15 PM »
Do you know any good tutorials etc. for C#

I picked it up pretty easily just by trying to make it do stuff I needed, but then I already knew C++ very well.  If you don't really know a programming language yet it's going to be much harder.  I learned to program on the ancient C For Dummies series of books, but that was way back in the 90s.  I'm not sure what people use these days.  But if there's one question I'm sure the internet can answer it's where to find resources for learning to program.

Quote
I might ask, how can I edit things on that link

You don't; it's a read only look at the repository.  If you want to make changes, you have to grab the repository and tools and make SVN patches (again, that DB3 link in the wiki is pretty explicit about how to set it all up).

Quote
I'm thinking of first adding some notes in the networking module.

Any work around networking is going to be premature, as I don't have answers to even very basic questions like TCP or UDP.  (UDP is traditionally what games use, but our multiplayer model in DB2 is very asynchronous and involves mostly sending largish bot files sporadically, so a simple TCP or web service interface might be better, but then maybe I want to do something more clever than what DB2 does).  Or how I'm going to serialize anything.

As a beginner programmer the code base is going to be pretty frightening.  You have to learn about things like unit testing and SVN patches, and most of the code is numerical algorithms for linear algebra, computational geometry, or DirectX shader code.  That said, the Sunweaver module (the DNA basically) is self contained and pretty straightforward, so it might be a good place to poke around.

There's just not a lot of low hanging fruit left.  If it was easy, I've already done it, or it's so far in the future that it doesn't matter yet.  Not to be discouraging!  I like when people help.  Just don't expect to pick up the code and make meaningful contributions if you've never worked on a large (for some definition of large :)) code base before.
I haven't worked on very large codebases, hence why its good that its modular :) I'll have a look at the sunweaver module, but the networking I can devise a basic outlining system of how to run it through. The speradic messages are terrible unideal at the moment, so is the connection via 1 single port (to be honest, peterIM in general is shoddy). It should be preparing for bots nearby the teleportation 'zone' as such, so that if they do go through not all the data is sent in that speradic moment. Alternatively a short limbo time where over 5 seconds maybe? a bot is taken through.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: DB3 progress
« Reply #12 on: March 27, 2015, 01:16:39 PM »
Well if you seriously want to play with networking, you're going to need some background reading so you know what you're talking about (Dunning-Kruger effect and all that).  A good resource might be Gaffer on Games.  There's a whole slew of articles that talk about networking in the context that most video games have to worry about it.  Darwinbots is a little bit different than any of the networking archetypes typical for games, but it's a good place to start.  (For the record, I doubt the core engine for Darwinbots will be deterministic just because I haven't put any effort towards that.)

If you can do the grunt work of reading and getting up to speed with the technology and infrastructure and tradeoffs available I'm liable to seriously consider any contributions you want to make.  My knowledge of game networking is pretty superficial as it stands, and someone else with domain knowledge there would obviously be a great resource.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #13 on: March 28, 2015, 07:37:30 AM »
Well if you seriously want to play with networking, you're going to need some background reading so you know what you're talking about (Dunning-Kruger effect and all that).  A good resource might be Gaffer on Games.  There's a whole slew of articles that talk about networking in the context that most video games have to worry about it.  Darwinbots is a little bit different than any of the networking archetypes typical for games, but it's a good place to start.  (For the record, I doubt the core engine for Darwinbots will be deterministic just because I haven't put any effort towards that.)

If you can do the grunt work of reading and getting up to speed with the technology and infrastructure and tradeoffs available I'm liable to seriously consider any contributions you want to make.  My knowledge of game networking is pretty superficial as it stands, and someone else with domain knowledge there would obviously be a great resource.
Checking that gaffer on games right now :) Thanks.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: DB3 progress
« Reply #14 on: March 28, 2015, 07:50:42 AM »
The peer-to-peer part gave me an idea, it mentions how its primarily now only used for RTS games (or turnbased games) Darwinbots, is a turnbased program. Each cycle representing one turn. The main problem they state is desyncronisation but thats mainly stated because they're sharing the same view, as in darwinbots we use different views, connected via a teleporter. Of course in darwinbots the cycles in the currrent IM rarely match, so we don't have to match speeds, we just need to hold whatever is being sent in limbo until it can be transported to the other end. The limbo also allows it to switch ports whichever its going through, though if it includes a limbo that'd start to transfer it more into a client-server topology (though it'd still function relatively close to peer-to-peer).

Preferred System:If we went for a direct client-server model a different approach could be taken, which is one I very much like. Each client can hook their 'area' to the server, with an outgoing only portal (because then we can let the weakest computers join in to!) then per client theres an ingoing portal on a 'server-held area'. This area is a larger, more powerful simulation. Then via a webpage or such what is happening can be displayed by a video feed. Because its a server it can handle many more bots, and can last for much longer because of the additional space and power. All the user-side area's have to comply to the rules set by whichever server they're connecting to (so when they send their bots in they won't just be huge big bertha's). This benefically means that completely slow computers, won't damage the sim in any way, as they're signal is sent out, then when its received its directly fired into the simulation, and both sims have no need to be in-sync as its one-way and they're different ''area's''

Hopefully that made as much sense as it did to me :P
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.