Corewar

Full Version: NetVolve [.NET] [Evolver Library]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: logo.png]
___INTRODUCTION_________________________________________________________________​______

Hello, I just wanted to show my current project I'm working on. I'm writing a library for .NET to easily evolve corewar warriors.
To achieve this I'm using a grid based system where warriors fight there neighbors to conquer new territory and if a warrior
conquer a new field there is a chance of mutation. You are also able to mix handwritten warriors into the grid so you can
get a nice starting population and don't have to begin from nothing.

___MUTATION_____________________________________________________________________​______

Currently there are 8 sorts of mutation which can occur.

Randomly...

1. changes addressing mods
2. changes instructors_______________
3. changes modifiers
4. changes numbers
5. changes the "END" line
6. adds a completely new generated line
7. removes a line

8. Crossover ( Mixes the winning warrior together with the defeated warrior of the conquered field )

And if you want to use some own mutation functions you can just implement them via a plugin system.
The settings also allow you to define different chances for every mutation method.

___INTERFACE____________________________________________________________________​______

[Image: thumb.png] [Image: thumb2.png]

I currently have programmed two UIs.
One simple that is just a console application and is finished and one that is a bit more graphical and not completely finished yet.

___DETAILS______________________________________________________________________​______

I also want to mention that the library is able to use multi-threading to work at the grid. Everything should be thread safe.
You can run as much threads as you want simultaneously, but I wouldn't recommend anything above 4 threads.

As simulator I currently use exMars but I'm planing to modify exMars so I don't have to drop any warrior on the hdd,
but there are some problems with calling native functions from exMars, so if you have any advice just let me know.

To generate the Names of warriors I wrote a little name generator that uses sets of syllables to generate random fantasy names.

Example (100 random names):
Code:
Lamatryubus, Valombaxraztuk, Gorgechimuriax, Cuthabbers, Velornorkan, Aereqyamayon, Falycdovon, Lisyphtiraldir, Xitregion, Urthopdufast, Phenitryumath, Nixur'enomos, Erelynsus, Samuchvor, Glannnminasin, Runimrain, Lileb'aemosh, Ulebronik, Betamralach, Bhiduneus, Marchuttulith, Naamephas, Gorgigonnin, Galewharadil, Zuqtir, Bagurbathra, Hatheghgotosta, Belekhruidor, Tarterbathan, Glosthragas, Korufdunagorn, Yaricklathadas, Isurttassralach, Grigemael, Astabur, Ragochtar, Daireckkath, Betapradaldil, Zubyzwynlen, Olyghthel, Govnarindur, Zanucklenik, Adutleg, Cutheghrek, Molichigion, Astostor, Vassarbanomos, Zonregen, Asentirith, Daimadkalthosus, Isoghmas, Mammomejes, Gotztharak, Xeralnngas, Zubyzhthradil, Zeraczsaradar, Tudhbar, Mermichissamath, Orcergolion, Viniphomosh, Chapleziladir, Hettuxkhad, Tsabab'aennin, Glighthrasin, Voryrhthnngas, Harissadralach, Yvednnebethlach, Elymvon, Kasophoces, Scephelith, Salekhttamavon, Gluzwentir, Kaseyadai, Betheclar, Balygstir, Brenunzilatar, Relgajdunadekhad, Chunrantir, Teereles, Naamettuneus, Scusias, Aerublach, Urthatzduzor, Elenorromithel, Alasenex, Zubuthmarain, Duvorrath, Isyqnahek, Boryfnik, Oluvledil, Arodhnaridin, Armiwlarak, Rubentimamath, Emelotrion, Daimithdunarim, Arthatzhararin, Aerarhfang, Mayeglar, Yaroghrodir, Eruqlach

___RELEASE______________________________________________________________________​______

[Image: download.png]

Source

___OUTCOME______________________________________________________________________​______

Currently I can't tell how good the outcome will be and how long it will take to produce it, but with a test of a bit older version I came up with something like that ( preset were used and it evolved about 5 hours ) :

Scored 116.4 at SAL TinyHill
Code:
;redcode-tiny
;name Emeluckbethrain
;author BigJk
mul.x # 331, $ 625
dat.f @ 18, @ 267
spl.x # 20, @ 686
mov.i $ -1, } -3
mov.i $ -2, } -4
djn.ba $ -2, < -3
mod.ba $ 0, $ 0
seq.x @ 404, { 13
spl.b @ 0, < 104
mod.b { 650, * 0
djn.ab @ 543, > 469
nop.f * 1, $ 8
mul.a $ 349, } 90
jmp.ba @ 468, @ 244
sub.i # 59, } -14
end 2

Scored 112.5 at SAL TinyHill
Code:
;redcode-tiny
;name Mardafsatir
;author BigJk
add.f # 8, $ 8
djn.f # 8, $ 99
dat.f $ 0, $ 0
dat.i $ 0, $ 0
dat.f { 470, * 49
dat.f $ 0, $ 0
jmp.ba $ 0, $ 0
dat.f $ 34, $ -362
dat.i $ 10, # -390
spl.f # 20, > 643
mov.i $ -1, } -3
mov.i $ -2, > -4
djn.a $ -2, < -3
dat.f < 0, $ 0
mov.ab > 667, { 344
mov.i > 276, > -253
djn.i $ -19, { 657
end 9

Scored 108.0 at SAL TinyHill
Code:
;redcode-tiny
;name Xoqchik
;author BigJk
add.i # 8, $ 8
djn.i # 52, $ 99
seq.ab { 533, * 12
dat.ba $ 0, $ 0
dat.f { 470, * 49
dat.a @ 0, $ 0
jmp.ba > 0, $ 0
dat.a $ 34, $ -362
dat.i $ 10, # -390
spl.f # 617, > 643
mov.i $ -1, } -3
mov.i $ -2, > -4
djn.a $ -2, < -3
dat.f # 662, $ 0
mov.ab > 667, { 344
mov.i > 276, > -253
end 9

Will post outcome of the current version after the next evolving session.

___DEMO_________________________________________________________________________​______

Little demo of the two different UIs. To get a better view watch it in HD.





1. Update

I'm still not finished with everything but I released a working version for windows and you can take a look at the source on Github.

Todo:
  1. Mono support
  2. Documentation
  3. Maybe a bit more optimizing and restructuring
2. Update: Extreme optimizing

A friend of mine changed exmars into a library that I can directly call from my evolver without the need of dropping the warrior to the hdd. My speed increase is between 5000% to 9000%.
Seems unbelievable but it's true. Before the optimizing I got about 30FPS ( Fights per seconds ) and now I get about 1500FPS - 3500FPS.

But before I can release this Version I just need to fix one minor bug that causes the evolver to freeze after some time.

Demo: Before and After


Wow, that really looks amazing. Did you get the minor bug fixed in the meantime?