1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Parallel Battle/Core Executors for Corewars/Red code on the gpu

Discussion in 'Nvidia' started by Skybuck Flying, Sep 2, 2009.

  1. Skybuck Flying

    Terry Newton Guest

    Forget QBasic, that has nothing to do with nothing.
    For one thing IF I pursued this, I wouldn't use QBasic anyway,
    FB is much better. And the part of it that interests me the most
    (coding for GPU's) would have to be done in a language supported
    by the available tools. But mainly, I simply don't have time right now
    to code much of anything besides the projects I'm already working on.

    Sorry but this is Your project :)

    That said, the prospect of a parallel MARS is interesting, something
    that could say battle several PAIRS of warriors at once, each battle
    providing independent results. No funny business, just perform all
    the indicated battles and return the results. For example, assuming
    4 threads...

    Global data
    Thread 1 warrior A data
    Thread 1 warrior B data
    ....
    Thread 4 warrior A data
    Thread 4 warrior B data

    ....then return the battle results for threads 1 to 4.
    No intermingling, etc, just like I called a MARS 4 times.
    4 is just an example, however many threads it's
    capable of.

    Then perhaps I can suggest some simple FreeBasic etc
    code to operate it.
    Yes something like that.

    The thing is, I need the parallel executor to be something that
    can be easily compiled for Linux to make use of it, and of course
    compiled for Windows too... a Delphi Windows-only solution
    just doesn't interest me. I'm looking for plain C or something
    that I can actually use, or it simply won't be used by me
    on any kind of regular basis. Other than maybe to play
    around with under VirtualBox or something, but that's not
    practical for any kind of speed, just for playing around.

    And for playing around... some varient of a "little" evolver
    would be sufficient, these don't take long to make and
    are very simple, so you can extend it to whatever
    you want, rewrite it, etc.

    But I am NOT interested in any sort of major project involving
    a Windows program I can't really use... I see this-only that-only
    solutions as very limiting so try to make sure the stuff I make
    can work regardless of one's chosen OS However, I am highly
    interested in a MARS that can run inside a '7900 etc GPU.
    Or more precisely, what it takes to run non-trivial code
    inside those things, languages, etc. This kind of stuff
    is OS-independent (other than the code used to load the
    program(s) and data into the GPU and collect results).
    A quick google search shows that Linux is well-supported
    for GPU programming (OpenGL etc) and it looks like
    a couple nVidia cards might be just the ticket for achieving
    super-fast performance for cheap. The lure of Gflops...

    Terry
     
    Terry Newton, Sep 3, 2009
    #21
    1. Advertisements

  2. There is still the issue of communicating the qbasic program... I simply
    Ok, when I write QBasic I mean whatever Basic floats your boat ! =D

    So FreeBasic it is =D

    (Hmm this time your message quoting does work... I guess you changed
    computer eh ? ;))

    So I will use this opertunity to intermingle my comments :)
    Yes I find corewars highly interesting because I learn a lot from it.. all
    kinds
    of coding skills and insights and such.

    Soon maybe even GPU skillzzz :)
    Yup but I am letting you take part of it if you want ;) :)
    Yes could be interesting.

    However for now my BattlefieldExecutor exists which almost does the same
    thing... with two threads for now and a battlefield... and a nice binary
    format...
    which should be more safe and especially faster than
    pmars/redcode/parsers/assemblers etc.

    (Though no super sanity checking yet implemented so I trust you write good
    binary data files,
    if you do manage to write a couple I will surely inspect them which will be
    much fun =D)
    See the specification V2.

    Maybe I shall also try to write some FreeBasic code for it unless you beat
    me to it ;) :)
    yeah and positions... for example warrior 1 is the winner it fought for cell
    5,5... it came from cell 4,4.

    So when reading battlefield cell 5,5 it will say Warrior.X := 4; Warrior.Y
    := 4;

    All warriors surrounding a cell will fight for the cell including the
    warrior on the cell.
    So I think that's 9 warriors ;)

    Battle type can be tournament mode or multi-fight.
    Scoring type can be winner only, winner or ties, or survivors.
    Well that's part of the fun :)

    You/me only get source code on a need-to-have-basis and everything is done
    at maximum speed (=binary).

    I live in the windows world... and there everything is done in binary and
    closed source mostly ;) :)
    I don't agree with that... I had to write significants ammount of code to
    get anbasic/good evolver going, so I am glad all that code of mine is
    re-usable :)
    Well the best I can do for you is give you a linux executable :)

    Bye,
    Skybuck.
     
    Skybuck Flying, Sep 3, 2009
    #22
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.