Friday, January 1, 2010

LML

One of the biggest issues that my system will have is being able to understand and manipulate any language. My plan for this is to get the user to quantify there language into a set mark-up language. For this purpose I created a language mark-up language or LML.


This part is needed to force the user to translate there language into a format that my genetic logic can deal with, need to be broad enough to be able to cover most modern languages. I also needed to be easy enough to learn so that anyone could use it. But one of the most important issues was the fact it needed to be efficient so that there isn't a gigantic overhead.


/$call$/(1+_Dup_Cha)


The above line is an example of LML. It indicates that a line from the “call” file is needed. The 1+ means there will be one or more instances of the line in the entity. Dup means that there can be identical lines in the system, the opposite of Dup is Uni which insures the line is unique. Cha means that the genetic logic can alter the line later with out the fear the program will break.


Implementing Corewar


Corewar is the first virtual environment that I have implemented. The entities that it runs are written in redcode, form of assembly. This is is a language with a very small grammar. It has only 16 calls. A small working bot can be written quickly but a complex and efficient one takes a lot of work.



@@Corewar

@@Main

/|/ Ver 5 of ml.

/|/ Core of corewars set


--;Gen:

--;Name:

--;Number of Copies:


;redcode-94


/$call$/(1+_Dup_Cha)


end



Above is the main centre of the redcode LML.

Below is one of the first entities in the redcode language, 00007.red.



;Gen:

;Name:

;Number of Copies:


;redcode-94


JMP <31,>


end



To display corewar battles I will be using Aries, a detailed and really good looking gui for corewar. For the actual evolution part I will use qMars[3]. This is a library that a client can pass redcode entities to and will return who wins as well as how well they won by and any other information I will need.


At the moment my system is not properly handling the fitness but this is an issue that can be fixed down the line.

No comments:

Post a Comment