Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gobo

Pages: 1 ... 3 4 [5]
61
DNA Tools / Sanger
« on: November 17, 2007, 02:33:10 AM »
Quote from: Numsgil
Neat, but you might want to consider changing the names for the "standard library" to be clearer.  For instance, EQZ is awefully cryptic if you've never used assembly.  And the macro language is supposed to be higher level than the original DNA.  Maybe something like EqualsZero or similar.
I thought about that, but preferred clarity to brevity. Actually these names are based rather on Perl operators than assembly. By the way, high level language may have nothing with clarity, e. g. see APL

Nevertheless thank you for your notice, I'm likely to add verbose names as aliases in the next revision.

62
DNA Tools / Sanger
« on: November 16, 2007, 05:15:38 PM »
Please check it out.

http://ersatz.org/sanger-1.0.zip

Feedback and bug reports are equally welcome. If you notice a bad turn of speech in documentation, please report me as well, since English is not my native language and I can hardly check myself.

Code: [Select]
NAME
    sanger.pl - Darwinbots DNA macro language interpreter

SYNOPSIS
        sanger.pl [file]
        sanger.pl -e [code]
        sanger.pl --help

DESCRIPTION
    Sanger is a macro language designed to make conditionless DNA
    construction easier. Sanger is named after Frederick Sanger, inventor
    of DNA sequencing.

    "sanger.pl" is Sanger interpreter which gives classic low-level DNA code
    on output. Sanger code may contain macro definitions and file
    inclusions. Everything else is interpreted as instructions, I. e. macro
    calls and plain DNA code.

MACROS
    Macro definition starts with DEFINE and lasts till a semicolon. Macro
    names are case-insensitive.

        DEFINE NEZ     $1 sgn abs;
        DEFINE NE      NEZ( $1 $2 sub );

    Definition of a macro may contain argument references: $1, $2 and so on.
    When macro is called, argument references are replaced with arguments.
    For instance,

        NE( *.myeye, *.refeye )

    is interpreted as

        *.myeye *.refeye sub sgn abs
    
FILE INCLUSIONS
    File inclusions start with INCLUDE and last till a semicolon, similar to
    macros.

        INCLUDE filename;

STANDARD LIBRARY
    These macros are found within 'stdlib.dna' file going in distribution.

    NOT( boolean )
    AND( boolean, boolean )
    OR( boolean, boolean )
    XOR( boolean, boolean )
        Boolean operators.

    EQZ( integer )
    NEZ( integer )
    GTZ( integer )
    LTZ( integer )
    GEZ( integer )
    LEZ( integer )
        Compare the top value on the stack with zero.

    EQ( integer, integer )
    NE( integer, integer )
    GT( integer, integer )
    LT( integer, integer )
    GE( integer, integer )
    LE( integer, integer )
        Compare two integers on the top of the stack.

    TEST( boolean, integer )
        If the first argument is true, pushes the second argument on the
        stack, otherwise pushes zero.

    IF( boolean, integer, integer )
        If the first argument is true, pushes the second argument on the
        stack, otherwise pushes the third.

EXAMPLES
        Lionfish's genes are taken for demonstration.

            INCLUDE stdlib.dna;

            ' Venom blinding and strvenom killer exploit
            IF( 1 rnd, IF( 1 rnd, .eye5width, .eye5dir ), .strvenom ) .vloc store

            ' Selective shooting
            DEFINE ENEMY NE( *.in1, *.refage );
            IF( GT( *.eye5, 60 ),
                IF( NEZ( *.refeye ),
                    TEST( ENEMY(), -3 ),
                    -6 ),
                TEST( GT( *.nrg, 1000 ), -3 ) ) .shoot store

SEE ALSO
    Frederick Sanger
        <http://en.wikipedia.org/wiki/Frederick_Sanger>

    Lionfish's genes explained
        <http://www.darwinbots.com/Forum/index.php?showtopic=2169>

AUTHOR
    Ivan Fomichev <ifomichev@gmail.com>

COPYRIGHT
        Copyright (C) 2007  Ivan Fomichev

        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.

63
Biology / Sexrepro (Real Life) questions
« on: November 13, 2007, 04:12:34 PM »
The question is great. It is not about what organelles or energy stermatozoa lack to reproduce. Cytological mechanics answer question how they cannot reproduce, but not why.

Let's suppose, some spermatozoa obtained "free-living" gene. Could this gene be successful? I doubt. They are not adapted for hostile environment, since they are too specialized. If it were some primitive organism with less specialized gametes, it could happen. Though I'm not ready for now to give a real-life example when gametes act like single cell organisms occasionally.

64
Bugs and fixes / Keeping eye on tied bot RESOLVED 2.43r
« on: November 12, 2007, 03:43:18 PM »
Isn't there any workaround?

65
Bugs and fixes / Keeping eye on tied bot RESOLVED 2.43r
« on: November 12, 2007, 01:59:51 PM »
I'm trying to make a bot keep an eye on whom it tied to. In most cases, it misses. Does anyone have an idea, what's the matter?

Code: [Select]
cond
*.eye5 50 >
*.numties 0 =
start
1 .tie store
1 .tienum store
stop

cond
*.tienum 1 =
start
*.tieang .aimsx store
stop

66
Quote from: Peter
Ok, then you just click on virus-immunity at the veggie, to my idea it has been inplented just for that reason.
Hmmm... Where is that setting?

67
Quote from: EricL
If you use veggies with enabled DNA in your breeding sim, they must be restricted from mutating else they infect your bots with a virus containing their own human authored DNA.
Restricting them from mutating may not help. Zerobots may evolve viruses, infect veggies, and veggies may then infect zerobots with their DNA back.

Pages: 1 ... 3 4 [5]