![]() ![]() input: sets F to the next float number in the input buffer.loop: will loop I times the following block (block ends at the next endloop).jumpifn: if F= 0, goes to the code position with the previously defined label I ![]() There are no other dependencies.Ĭompile the Slash/A library libslasha.a first:ĭ: | | | | | | |. Slash/A only needs g++ and its standard libraries. Slash/A comes with a Default Instruction Set (DIS) covering most elementary instructions for flow control, mathematics, etc (see below), but users can introduce any number of custom instructions with simple C++ classes Because the code is expressed as a string of atomic instructions, any randomly generated code is semantically correct. With a Monte Carlo example, Slash/A's interpreter runs only 2x slower than an analogous code written in pure optimized C++ code. Slash/A's interpreter introduces a highly optimized Bytecode interpreter that rivals compiled code. Genetic Programming: On the Programming of Computers by Means of Natural Selection Features A mutation operation is thus a simple replacement of a number in such a vector by another random integer, while a crossing-over operation can be accomplished by simply cutting-and-pasting the appropriate vector segments into another vector.īecause one can map any instruction from a Turing-complete language (C, Pascal, etc) into a Slash/A code, Slash/A is Turing-complete, though it needn't be so (as one can pick and choose which instructions to enable). When expressed as Bytecodes, a Slash/A program is represented by a simple C++ vector of unsigned numbers, each of which corresponds to an instruction. Instruction argumentation is effectively done through fixed registers (see below). This is important in genetic programming as it enables the free mutation of any instruction without worrying about its number and types of arguments. The instructions are atomic in that they don't need any arguments (unlike some x86 assembly instructions, for example), so any random sequence of Slash/A instructions is a semantically correct program. D := F)Īdd/ # adds to F current data pointed to by I (i.e. ![]() Save/ # saves content of F into data vector D (i.e. Input/ # gets an input from user and saves it to register F ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |