|
-
13th November 2015, 13:54
#31
Such a program would also need to respect the environmental constraints that where considered during its design.
The most common type of program that creates other programs is a compiler. Its input is source code and parameter values. It has several possible outputs, syntax error messages, warnings, as well as binary files (if no syntax errors are detected) containing machine instructions.
A system that would create a program based on feedback requires some database of information that details all possible variations expected in the feedback stream, or a method to calculate a result based on aspects of the input stream, so that some logical determination can be made and "translated" into an algorithmic response to the input stream that is then compiled...
This is much simpler to do by creating a program that addresses the issue directly, such a program would have access to the same database of information, or methods of calculation but would come compiled with all the code to address the feedback stream directly. No need to compile a new program.
As such you can expect most computer programs, even if executed by an interpreter (clever computer algorithm to compile code at run time) to have modular characteristics. Modular in that logic is packaged into descrete units or functions that closely follow data structures they are designed to work with. There is one exception to that, the Lisp system, that I am acutely aware of anyway.
In a Lisp system program instructions is program data. And data may be executed in a way that may change other "program instructions" or aspects of the runtime. Python and some other high level languages have the ability to do this to a certain extent, by manipulating a data structures meta values, but these manipulations are explicitly done. In Perl, for example, the Moose package performs such manipulation. Lisp is different in that all execution manipulates the Lisp machine state, and therefore its runtime memory footprint and its instructions. Intelligence agencies used Lisp to create the runtime environment in those viruses they used against the Iranians... and populations...
But even programming lisp, and I've done some elementary Lisp programming, does not exempt consideration of environmental scope and the complete array of functionality required to perform a task. Lisp just does it in a different way, it requires a different view about solving problems. Many great things have emerged as a result though, the Java runtime is said to have its conceptual architectural design defined around characteristics of the Lisp runtime. You can visit clisp.org if you want to download it FYI.
As an example of how a program functions, consider Deep Blue, the IBM chess machine. It plays by trying all moves of almost all game combinations until its move allocation time has expired, then it chooses which scenario of the millions that it simulated that most matches a win, or a game configuration within a database that is known to be a "strong position", or a game configuration that matches some other calculation of a "good scenario", then it moves a piece in the game, as played in the simulation. In a way, the Tree type structure of these various simulated game scenarios are like function calls and branch logic.
To extend that to an environment off the chessboard is a huge undertaking. It requires a very logical and even scientific evaluation of all environmental aspects to be considered, how things interrelate... and how preexisting logic can be fit. This task requires a skilled software architect, a human being. If a computer program could perform this task, it would only really be able to perform it for an environment as complex as which was specified during its creation.
-
The Following 2 Users Say Thank You to lcam88 For This Useful Post:
Amanda (1st May 2017), donk (13th November 2015)
-
13th November 2015, 14:29
#32