Bricks and towers in Prolog

This program is a simple demonstration for illustrating how classic declarative programming can provide very intuitive and compact solution generators for logic problems and combinatorial tasks. In this example, a set of bricks with three sizes and a stability constraint ("do not put larger above") is coded to provide solution searching on all possible ways to build a stable tower of a specific height.

Prolog's main advantage over other declarative programming languages is that even in the early '80s came with a rich library of common functionalities that made real-world application development easy. Turbo Prolog was probably the best option for PC machines, with efficient memory enhancements via more strict typing and other syntax shortcuts to limit the tree search in manageable space/time requirements for these platforms. Although now depricated by constrained and fuzzy logic paradigms, Prolog-style programming is still the most intuitive way to design simple expert systems and knowledge management platforms.

Enable captions for more details and walk-through. Source code available at the Github repository (see channel info).

Tags: #asmr #coding #programming #notalking #prolog #retro #msdos #dosbox

Comments

Popular Posts

Hello x86: Low-level assembly coding for the 8086

Announcement: Writing a new book in Data Science and R&D projects

Fibonacci numbers in C (4 different ways)

Multiplication tables in COBOL

Channel Updates