One or more machine code entities such as functions are created which
represent solutions to a problem and are directly executable by a
computer. The programs are created and altered by a program in a higher
level language such as "C" which is not directly executable, but requires
translation into executable machine code through compilation,
interpretation, translation, etc. The entities are initially created as an
integer array that can be altered by the program as data, and are executed
by the program by recasting a pointer to the array as a function type. The
entities are evaluated by executing them with training data as inputs, and
calculating fitnesses based on a predetermined criterion. The entities are
then altered based on their fitnesses using a machine learning algorithm
by recasting the pointer to the array as a data (e.g. integer) type. This
process is iteratively repeated until an end criterion is reached. The
entities evolve in such a manner as to improve their fitness, and one
entity is ultimately produced which represents an optimal solution to the
problem. Each entity includes a plurality of directly executable machine
code instructions, a header, a footer, and a return instruction. The
alteration process is controlled such that only valid instructions are
produced. The headers, footers and return instructions are protected from
alteration. The system can be implemented on an integrated circuit chip,
with the entities stored in high speed memory in a central processing
unit.