water-vapor / human-resource-machine-interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Human Resource Machine Interpreter

The program reads the code generated by Human Resource Machine and execute according to given input and memory state. This project means to make the instruction set programmable. You can define your own problem, write your own code(in the given format) and use your own test data. However the problem and test data from the original game is not available, because they may be subject to copyright.

Usage

Take Problem 40 for example. hrmi(read_file('~/github/human-resource-machine-solutions/41.asm), [78,34,54,0,'c','l','o','u','d',0], memory_size=25, memory={24:0}) will return [['u', 'o', 'l', 'd', 'c', 78, 54, 34], 223, 20], which corresponds to output, steps, and size.

About

License:MIT License


Languages

Language:Python 100.0%