Sou recente no Latoratorio de Garagem e uma mensagem de "Publique" pediu que eu adicionasse algum projeto no Blog. Segue entao o resultado de algumas horas de diversao que eu publiquei no github.



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



Exibições: 380

Comentar

Você precisa ser um membro de Laboratorio de Garagem (arduino, eletrônica, robotica, hacking) para adicionar comentários!

Entrar em Laboratorio de Garagem (arduino, eletrônica, robotica, hacking)

Comentário de João Alberto em 3 setembro 2012 às 11:50

Que legal! Estou estudando sobre programação genética. Vc poderia comentar sobre o código.

Como ficaria esse programa implementado no Matlab?

© 2024   Criado por Marcelo Rodrigues.   Ativado por

Badges  |  Relatar um incidente  |  Termos de serviço