Recent Posts

Pages: 1 ... 8 9 [10]
91
Suggestions / Re: GPGPU acceleration?
« Last post by Billy on April 28, 2017, 09:30:25 AM »
Problem is GPUs only benefit when they can do the same operation (add, multiply, etc.) in parallel.  Even if you put the DNA on the GPUs somehow, you still can't execute more than one DNA program at a time.

It's a problem of SIMD vs. MIMD.  GPUs need SIMD to overcome the additional cost of transferring the data to/from the GPU and starting up a processing batch, but most of Darwinbots is either SISD or MIMD.  The DNA execution is MIMD, certainly.  The physics has passes of MIMD but then everything bottlenecks in places through a SISD section.  In that sort of problem, CPUs are still king.

I guess you're probably right. I was thinking that if 90% of the bots have very similar DNA and are doing exactly the same activity, there would be very little divergence and it would effectively be SIMD.  I'd still like to make a prototype, maybe with some minimal language rather than DNA, so I can compare the performance with that on a CPU.

Botsareus: what kind of thing do you think would be better? A chip with lots of simple MIMD cores?
92
Darwinbots3 / Re: Bot testbed
« Last post by Botsareus on April 28, 2017, 07:08:09 AM »
Also a question, how will sexrepro actually work? (sorry for asking the same question more than one time :)
Basically if you have stuff like { } and loop does the instruction set get decompressed first or is { } and loop treated as symbols to crossover?
93
Suggestions / Re: GPGPU acceleration?
« Last post by Botsareus on April 28, 2017, 06:03:33 AM »
We need better designed hardware is what we need.  :P
94
Suggestions / Re: GPGPU acceleration?
« Last post by Numsgil on April 28, 2017, 05:58:10 AM »
Problem is GPUs only benefit when they can do the same operation (add, multiply, etc.) in parallel.  Even if you put the DNA on the GPUs somehow, you still can't execute more than one DNA program at a time.

It's a problem of SIMD vs. MIMD.  GPUs need SIMD to overcome the additional cost of transferring the data to/from the GPU and starting up a processing batch, but most of Darwinbots is either SISD or MIMD.  The DNA execution is MIMD, certainly.  The physics has passes of MIMD but then everything bottlenecks in places through a SISD section.  In that sort of problem, CPUs are still king.
95
Darwinbots3 / Re: Bot testbed
« Last post by Botsareus on April 28, 2017, 05:50:19 AM »
I like the idea of using multiples for memory range, basing it from days in year aka about 360 is not a bad idea. However, we need to consider what other values stuff will return and incorporate the prime numbers from these into it. That is why I prefer to go with large ranges with stuff like this. In my experiments I always go with longs actually even though I do not need them.
96
Darwinbots3 / Re: Bot testbed
« Last post by Billy on April 27, 2017, 06:56:20 PM »
Mine is more concise though!

I think it was when I was fiddling with the number on the last line that is now 30, I can't seem to reproduce it now unfortunately.
97
Suggestions / Re: GPGPU acceleration?
« Last post by Billy on April 27, 2017, 06:40:37 PM »
Couldn't kernels read tokenised DNA code from one buffer, memlocs from another, and interpret the DNA? Writing the new memloc values to a third buffer, perhaps. There is a lot of branching, which would reduce the benefit from SIMD processors, but maybe this could be reduced by grouping similar bots. Most bots spend the vast majority of their time doing one thing, from my experience (at least in evosims), like searching or spinning, so this might just work.
98
Darwinbots3 / Re: Bot testbed
« Last post by Numsgil on April 27, 2017, 05:29:36 PM »
Looks good but I think shadowgod still has you beat :)

If you can figure out under which circumstances it bugs out that would be good.  It's possible it's a bug in the program that I should fix.
99
Suggestions / Re: GPGPU acceleration?
« Last post by Numsgil on April 27, 2017, 05:16:27 PM »
Executing the DNA isn't really well suited for GPUs, unfortunately, since each bot has to run its own DNA on its own data.  Getting the physics to execute on GPUs is possible in principle but rarely done in practice.  Probably only shots are really suited for GPU calculations, but we just don't have enough shots in a typical sim to outweigh the upfront CPU cost of transferring things to/from the GPU.
100
Suggestions / GPGPU acceleration?
« Last post by Billy on April 27, 2017, 10:04:56 AM »
I know it's pain to get working, but a simulation with many bots seems like an ideal problem for opencl or similar. One job for each bot, and perhaps even grouping similar bots into warps for SIMD execution on Nvidia chips. You wouldn't necessarily have to move much data between main memory and GPU memory if you don't need to observe the simulation in real time.

I've only dabbled with GPU programming though (circle detection in images), so maybe it's not as well suited as it seems. I am aware that it would take a lot of effort to port all of the DB simulation code to opencl, what with the physics, DNA interpretation, reproduction mutation... Maybe I'll try making something similar from scratch over the summer, specifically geared towards GPGPU execution.
Pages: 1 ... 8 9 [10]