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.
System design as Modelling graph TD A[The Problem to be Solved] --> |Suitable for computation| B[The Program] B --> D[The Output] D --> |Result suitable for interpretation| C[The request required] A --> |What we want| C Modelling Process graph LR A[Real World Problem] --> B[Information Model] B --> C[Conceptual Model]...
Let Sometimes we want to use the same expression more than once: (x * x - 4) + sqrt (x * x - 4) The problem of writing out the same equation over again can be solved using the following example: let s = (x * x - 4) in...
IF Differences Between Imperative and Functional In imperative languages if changes the control flow but in functional languages there is no control flow. Functional if gives a value that you will return based on a test. if (1==1) then "yes" else "no" Rather than controlling flow, functional if chooses between...
Input: a start state s_0 for each state s the successors of s a test goals(s) checking whether s is a goal state Set frontier := {s_0} while frontier is not empty do select and remove from frontier a path s_0...s_k if goal(s_k) then return s_0...s_k (and terminate) else for...
In real search problems the state space is huge e.g. Rubik’s Cube - $10^{18}$ which will take 68,000 years to brute force at 10 million states/sec. This is an example of the combinatorial explosion. In addition, we cannot store all of the states. Instead, given the start state. We can...
BFS and DFS are blind search algorithms meaning we have no further information about the tree. Solving Problems by Searching Considering that there is a goal-based agent that want to bring about a state of affairs by completing some actions. These actions need to be ordered in order to reach...
Defining Custom Functions Functions are defined as such: [functionName][arguments][=][body] Functions and arguments must start with small letters as only types use capitals. They can be written into a file and loaded into GHCI or compiled for use in a program. An example of a simple function: addTwo x = x...
Functions and Libraries When using Haskell the default library is Prelude. Haskell uses special syntax for function calls. min from the Prelude library will work as min 1 2. This is as functions are called as: [function name][space][arg1][space][arg2]... Additionally in Haskell functions bind tighter than mathematical operators: Prelude> min 28...
Intelligent agents are classified depending on how they map their precepts to their actions. They can be classed under: Simple reflex agents Select actions to execute based upon the current percept Don’t take the percept history into account. Very simple IFTTT actions. Very simple to implement but have limited intelligence....
Entities that are engineered in AI are known as agents. An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. PEAS Performance Measure The criteria by which we can measure the success of an agent’s behaviour. Environment The external...