Back Tracking Rule (Prolog) for Fish Chain

We will be using backtracking rule of prolog in our project named Fish |Chain with the structure of vertebrates. It will help to initialize each kind with their respective genes. We have used different kind of vertebrates and each kind relate with it’s sub kind or grant kind.

To find all the kinds of vertebrate we will be implementing the query: kind(X,vertebrate). This will let us know all the respective kinds vertebrates have. For suppose if we want to know the grand kind of actinopterygii(a type of fish), the query: superkind(X,actinopterygii) will help us know the grand kind of actinopterygii.

Backtracking also know as family tree helps to get the relation between each item define in the system. It is based on facts, rules and queries. Facts are knowledge which we provide, Rules are instructions how facts will act and Queries is we ask the system.

type(agnatha, vertebrata).
type(gnathostomata, vertebrata).

kind(euconodonta, vertebrata).
kind(pteraspidomorphi, vertebrata).

kind(thelodonti, vertebrata).
kind(anaspida, vertebrata).
kind(galeaspida, vertebrata).
kind(pituriaspida, vertebrata).
kind(osteostraci, vertebrata).
kind(hyperoartia, agnatha).
kind(myxini, agnatha).
kind(placodermi, gnathostomata).
kind(acanthodii, gnathostomata).
kind(chondrichthyes, gnathostomata).
kind(euteleostomi, gnathostomata).
kind(acanthodii, chondrichthyes).
kind(holocephali, chondrichthyes).
kind(euselachii,chondrichthyes).
kind(acanthodii,euteleostomi).
kind(actinopterygii,euteleostomi).
kind(sarcopterygii,euteleostomi).
kind(cladistia,actinopterygii).
kind(chondrostei,actinopterygii).
kind(neopterygii,actinopterygii).
kind(onychodontiformes,sarcopterygii).
kind(actinistia,sarcopterygii).
kind(rhipidistia,sarcopterygii).
kind(porolepiformes,rhipidistia).
kind(dipnoi,rhipidistia).
kind(tetrapodomorpha,rhipidistia).
kind(rhizodontimorpha,tetrapodomorpha).
kind(tristichopteridae,tetrapodomorpha).
kind(tiktaalik,tetrapodomorpha).
kind(tetrapoda,tetrapodomorpha).
kind(ichthyostega,tetrapoda).
kind(crowngroup,tetrapoda).

superkind(hyperoartia,vertebrata).
superkind(myxini,vertebrata).
superkind(placodermi,vertebrata).
superkind(acanthodii,vertebrata).
superkind(holocephali,vertebrata).
superkind(euselachii,vertebrata).
superkind(cladistia,vertebrata).
superkind(chondrostei,vertebrata).
superkind(neopterygii,vertebrata).
superkind(onychodontiformes,vertebrata).
superkind(actinistia,vertebrata).
superkind(porolepiformes,vertebrata).
superkind(dipnoi,vertebrata).
superkind(rhizodontimorpha,vertebrata).
superkind(tristichopteridae,vertebrata).
superkind(tiktaalik,vertebrata).
superkind(ichthyostega,vertebrata).
superkind(crowngroup,vertebrata).


havekindof(X):-kind(X,_).
noofkind(X):-kind(_,X).
supertype(X,Y):-kind(X,Z),kind(Z,Y).
havetypeof(X):- type(X,_).

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top