-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
usuario02
committed
Aug 13, 2010
1 parent
05ae50c
commit 56bc836
Showing
1 changed file
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
./gp -n 20 -t 50000000 -i 10 -H 30 | ||
This project is a little toy in genetic programming. Basically we built a system that uses genetic programming to synthesize code into a tiny virtual machine. | ||
|
||
To play you need of: | ||
-> gcc | ||
|
||
Building | ||
|
||
In the src directory, execute the command: | ||
$ make | ||
|
||
Testing | ||
|
||
Run without changes, the gp program try synthesize a program that does the multiplication of two integers. Note that the virtual machine has no instruction of multiplication. Use this command for see the program in action: | ||
|
||
$./gp -n 20 -t 50000000 -i 10 -H 30 | ||
|
||
|
||
Instructions of Virtual Machine | ||
|
||
MOVE x y - put the value of y in x | ||
MOVI x num - put the value num in x | ||
ADD x y - adds the value of y at x | ||
SUBI x num - decreases the value num at x | ||
JUMPZ x pc - if x value is zero, jump to instruction in position pc | ||
JUMP pc - jump to instruction in position pc | ||
RET - stop the program | ||
|
||
|
||
Trumae <trumae@gmail.com> | ||
|