Highlights
Learning Objectives
At the end of this lab you should be able to:
1. Explain the behaviour of forward and backward chaining
2. Demonstrate the matching and unification algorithms
3. Implement optimisations to the forward and/or backward chaining approaches
4. Translate first-order formulas into the TPTP format
5. Run Vampire on TPTP problems and explain what the proofs mean
6. Relate Vampire options to the given-clause algorithm given in lectures
7. Use Vampire to answer queries on a ‘real’ knowledge base
8. Apply reasoning methods to the output of parsing to build a toolchain for symbolic AI
A stretch learning object is by the end of this lab you might be able to build your own simple reasoning tool.
Part 1: Building Reasoning Tools
The aim of this part is to get some insight into how to build reasoning tools. It focuses on the relatively simple forward and backward chaining reasoning approaches. I had intended for you to write a lot more of the tools but have ended up providing minimal working versions for you to improve. You should make use of the forward reasoner.py and backward reasoner.py Python3 programs included in the part1 directory. To run these you need to have the Antlr4 Python3 runtime installed, which can be
done via pip e.g. by running python3 -m pip install antlr4-python3-runtime. I have written these programs to try and emulate what you have seen in lectures. I have tested them a reasonable amount. If you find bugs please report them to me (Giles). The forward reasoner will compute the closure of the knowledge base and then answer queries. The backward reasoner will prompt for queries and try and answer each query (like in Prolog). I have defined a RuleLanguage that matches closely with what was introduced in lectures. The only element that may be surprising is the way disequality (e.g. X != Y) is treated. Neither chaining algorithm supports carrying around information on what should not unify. Therefore, a disequality as a guard in a rule will only check whether the current values for the relative terms unify or not.
This Computer Science Assignment has been solved by our Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.