Prolog Programmer 1

Proyect Based in LEGO constructions

They are arranged for LEGO constructions. These parts can be rectangles or squares. The pieces are defined

by a compound term

part / 4, where the first argument represents the width of the piece (number of nails), the second argument the

height of the workpiece, the third argument depth (number of nails) and the last argument color piece.

• The workpiece dimensions (width, height and depth) are represented as numbers Peano.

• Colors that are available are: red (r), blue (a), green (v) and yellow (am).

• Example : (S (s (s (s (0)))), s (0), s (s (0)), r)

Available parts may be supported on the ground or on another piece assembled, forming a construction. The

constructions, they are composed of at least one piece, can be of two types:

• Tower: each level of the building has a single piece. In addition, each piece can only be assembled over

an equal or larger than she part (the length and width of the bottom piece must be greater or equal to the

same dimensions of the top piece).

• Building: each level of the building may consist of several pieces (always the same depth and height 1),

which can be assembled in any way.


The constructions type tower They are represented as lists, where the last part of the tower is the head of the

list. The constructions building type They are represented by a matrix (a list of lists) showing the elevation of

the building. In said matrix, each row (each inside list) represents a level of construction (building) and each

cell (element of internal list) represents a nail one piece by using the color of the piece that is in said instead of

the elevation. The number of rows in the array is the number of levels of the building, and the number of

columns is the number of nails wider level. The cells of the matrix not including nails parts are represented by

the constant 'b'.


You are asked to define the following predicates for tower type buildings:

• esTorre / 1 ( esTorre (Construction)): predicate checks whether Construction meets the conditions for

a tower.

• alturaTorre / 2 ( alturaTorre (Built, A)): predicate that tests whether the first argument (Construction)

is a tower, and the second argument (A) is the height of the tower.

• coloresTorre / 2 ( coloresTorre (Construction, colors)): predicate verifies if the first argument

(construction) is a tower and the second argument (Color) is a list with the colors of the tower.

• coloresIncluidos / 2 (ColoresIncluidos (Construction1, Construction2)):

predicate is verified if (a) both predicates are towers and (b) all colors of Construction1 are also in the



You are asked to define the following predicates for building construction type:

• esEdificioPar / 1 ( esEdificioPar (Construction)): predicate that is true if construction is a building that

meets each level has an even number of nails.

• esEdificioPiramide / 1 ( esEdificioPiramide (construction): predicate that checks whether

construction is a building that meets each level has a strictly higher than the level above wide.

Evner: Ingeniørarbejde, Prolog, Software Arkitektur

Se mere: calculate salary application using prolog programming, using php open web page inside, freelance prolog programmer, prolog download, prolog programming tutorial, prolog programming examples, prolog tutorial w3schools, logic programming, prolog vs lisp, features of prolog in artificial intelligence, prolog software, someones head picture using photoshop, adult social networking website unlike net highly motivated experienced programmer head projectwellversed building web sitesduti, head internal audit mcb, can bill internal elastix extensions using a2billing, prolog programmer, neural networks using prolog example, hill climbing algorithm using swi prolog, internal storage android using phonegap, face model head using image blender

Om arbejdsgiveren:
( 0 bedømmelser ) Madrid, Spain

Projekt ID: #18990658

Tildelt til:


Hola soy programador experto en prolog, la mayoria de proyectos que he realizado en freelancer han sido proyectos en prolog, puedes verificar mi reputación

€60 EUR in 5 dage
(11 bedømmelser)

2 freelancere byder i gennemsnit €280 på dette job


Hi sir , i can help you with this project if you want kindly contact me to discuss the details , thanks.

€500 EUR in 20 dage
(7 bedømmelser)