This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.
Polymorphic Types Some functions accept many different types. An example of this is length which accepts many different types of lists. if you ask what the type of then function length is then it will return the type: length :: [a] -> Int a is a type variable. This means...
Suppose that are sets with . Commutative Laws These laws say that is doesn’t matter in which order the operation takes place. Associative Laws These laws say that is...
In this tutorial the first main focus was the group project. User Stories You might want to use user stories or define user personas: As a… [which type of user has this need?] I need… [what does the user want to do?] So that… [why does the user want to...
Function Types Functions also have types in the type system. The type of a function is based on the values it takes as an argument and returns. Single Argument Functions For a one argument function, the type is written as: [input type] -> [output type] Multi-Argument Functions For a function...
Types Everything in Haskell has a type. In GHCI :type or :t will display the type of an expression. Basic Types Int Holds a 64-bit integer between and Integer Holds arbitrary size integers but is slightly slower than an Int. Ideally you should use an Int if you...
You cannot express relations between objects using the concepts we have learned so far. Relations are expressed as such: A relation name denotes a set of pairs of individual object. Relation names are also called binary predicates: These call also be denotes by upper case letters ...
The following algorithm take as input the knowledge base containing and and computes all assertions with a class name and an individual name such that . This set is stored in: In only remains to check whether is in . The...
Syntax An individual name denote an individual object. They are also called constant symbols: England We also use lower case letters: An individual variable is a placeholder for an individual name. They are denoted by lower case letters: A class name denotes a set of individual objects. They...
Declarative Approach The declarative approach to building agents includes telling the agent what it needs to know. From this the agent uses reasoning to deduce relevant consequences. It requires: A knowledge base / ontology Which contains fact and general knowledge about a domain in some formal language. A reasoning engine...
If you know half way through a calculation that it will succeed or fail, then there is no point in doing the rest of it. This removes redundant information. graph TD subgraph max1[MAX] A0 end subgraph MIN A1 A2 A3 end subgraph max2[MAX] A11 A12 A13 A21 A22 A23 A31...