لغة برمجة غير حتمية

ان لغة البرمجة غير الحتمية nondeterministic هي لغة التي يمكنها ان تحدد في مرحلة محددة( تدعى نقطة الاختيار ) في البرنامج اختيارات عديدة لسير وتدفق عمل البرنامج . على عكس جملة if-then فإن المنهجية للاختيار بين بدائل تدفق البرنامج هي غير محددة بشكل مباشر من قبل المبرمج "المطور " .

ان البرنامج يجب ان يحدد خلال مرحلة العمل runtime اختيار سير العمل بين عدة بدائل , يتم ذلك بواسطة بعض المنهجيات العامة المطبقة على جميع نقاط الاختيار .

ان المبرمج يقوم بتحديد عدد محدد من البدائل ,لكن البرنامج يجب ان يختار لاحقاً بين هذه البدائل .ان مفهوم الاختيار في عالم الآلات يدعى بعدم الحتمية nondeterministic ان هرمية نقاط الاختيار يمكن تشكيلها بمستوى اعلى من الاختيار الذي يقود الاغصان التي تحوي الاختيارات من المستوى الادنى .

One method of choice is embodied in backtracking systems (such as AMB, or unification in Prolog), in which some alternatives may "fail," causing the program to backtrack and try other alternatives. If all alternatives fail at a particular choice point, then an entire branch fails, and the program will backtrack further, to an older choice point. One complication is that, because any choice is tentative and may be remade, the system must be able to restore old program states by undoing side-effects caused by partially executing a branch that eventually failed.

Another method of choice is reinforcement learning, embodied in systems such as Alisp. In such systems, rather than backtracking, the system keeps track of some measure of success and learns which choices often lead to success, and in which situations (both internal program state and environmental input may affect the choice). These systems are suitable for applications to robotics and other domains in which backtracking would involve attempting to undo actions performed in a dynamic environment, which may be difficult or impossible.