<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="et">
	<id>http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=Automated_reasoning_homework_2016</id>
	<title>Automated reasoning homework 2016 - Redigeerimiste ajalugu</title>
	<link rel="self" type="application/atom+xml" href="http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=Automated_reasoning_homework_2016"/>
	<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;action=history"/>
	<updated>2026-05-14T04:53:42Z</updated>
	<subtitle>Selle lehekülje redigeerimiste ajalugu</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;diff=5016&amp;oldid=prev</id>
		<title>Tanel: /* Examples to use as a starting point */</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;diff=5016&amp;oldid=prev"/>
		<updated>2016-11-14T13:36:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Examples to use as a starting point&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;et&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Vanem redaktsioon&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Redaktsioon: 14. november 2016, kell 13:36&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l78&quot; &gt;78. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;78. rida:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[A question posed: find a mortal in the text]]: we just add &amp;lt;tt&amp;gt;-rdf(X,&amp;quot;id:type&amp;quot;,&amp;quot;mortal&amp;quot;) | $ans(X).&amp;lt;/tt&amp;gt; to the facts (i.e. a negated query with a variable and $ans to capture a suitable value for X.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[A question posed: find a mortal in the text]]: we just add &amp;lt;tt&amp;gt;-rdf(X,&amp;quot;id:type&amp;quot;,&amp;quot;mortal&amp;quot;) | $ans(X).&amp;lt;/tt&amp;gt; to the facts (i.e. a negated query with a variable and $ans to capture a suitable value for X.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Probabilities and web scraping]] Determine the type of objects using information from a web page and probability-like measures.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Probabilities and web scraping]] Determine the type of objects using information from a web page and probability-like measures.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Example with weather, dates and trust]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to create the Otter file and use the output ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to create the Otter file and use the output ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tanel</name></author>
	</entry>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;diff=5008&amp;oldid=prev</id>
		<title>Tanel: /* Administrative */</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;diff=5008&amp;oldid=prev"/>
		<updated>2016-11-07T11:43:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Administrative&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;et&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Vanem redaktsioon&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Redaktsioon: 7. november 2016, kell 11:43&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot; &gt;10. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;10. rida:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Administrative ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Administrative ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!--&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Homework defence deadline: 1. December. Presentation afer this deadline will give half of the points. Absolute deadline is 8. December: no submissions will be accepted after that,.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Homework defence deadline: 1. December. Presentation afer this deadline will give half of the points. Absolute deadline is 8. December: no submissions will be accepted after that,.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Work should be submitted to git, latest one day before deadline.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Work should be submitted to git, latest one day before deadline.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tanel</name></author>
	</entry>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;diff=5007&amp;oldid=prev</id>
		<title>Tanel: Uus lehekülg: &#039; == Automated reasoning homework as a second part of a two-phase project ==  The goal of this homework is  * to learn about representing knowledge and rules in logic * experiment...&#039;</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=Automated_reasoning_homework_2016&amp;diff=5007&amp;oldid=prev"/>
		<updated>2016-11-07T11:42:44Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039; == Automated reasoning homework as a second part of a two-phase project ==  The goal of this homework is  * to learn about representing knowledge and rules in logic * experiment...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Automated reasoning homework as a second part of a two-phase project ==&lt;br /&gt;
&lt;br /&gt;
The goal of this homework is &lt;br /&gt;
* to learn about representing knowledge and rules in logic&lt;br /&gt;
* experimenting with an automated reasoner&lt;br /&gt;
&lt;br /&gt;
The concrete task is to add some common sense rules to the rdf or multi-arity representation output of the first phase of the project and then ask and prove some example queries using an automated reasoner.&lt;br /&gt;
&lt;br /&gt;
== Administrative ==&lt;br /&gt;
&lt;br /&gt;
Homework defence deadline: 1. December. Presentation afer this deadline will give half of the points. Absolute deadline is 8. December: no submissions will be accepted after that,.&lt;br /&gt;
&lt;br /&gt;
Work should be submitted to git, latest one day before deadline.&lt;br /&gt;
&lt;br /&gt;
The groups are same as for the first phase&lt;br /&gt;
&lt;br /&gt;
== What you have to do ==&lt;br /&gt;
&lt;br /&gt;
First of all, by default we will use the [http://www.cs.unm.edu/~mccune/otter/ otter prover]. Download it and try out some example problems in the otter zip file. Have a look at the manual as well.&lt;br /&gt;
&lt;br /&gt;
Suppose you have a  triplet like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [http://en.wikipedia.org/wiki/Barack_Obama,&lt;br /&gt;
   http://en.wikipedia.org/wiki/china],&lt;br /&gt;
   id:type&lt;br /&gt;
   http://conceptnet5.media.mit.edu/web/c/en/person&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the list [ http://en.wikipedia.org/wiki/Barack_Obama, http://en.wikipedia.org/wiki/china ] means that we do not know&lt;br /&gt;
which interpretation is the correct one (the original word was like he,this,she,it,...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, pick just one interpretation like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   http://en.wikipedia.org/wiki/Barack_Obama,&lt;br /&gt;
   id:type&lt;br /&gt;
   http://conceptnet5.media.mit.edu/web/c/en/person&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then&lt;br /&gt;
&lt;br /&gt;
* represent it in otter format&lt;br /&gt;
* add common sense rules about the domain of news and  politics (ontology: like a taxonomy, can be a bit more complex)&lt;br /&gt;
* pose a question in otter format&lt;br /&gt;
* run otter to find answer&lt;br /&gt;
&lt;br /&gt;
If you manage to do that, you will pass.&lt;br /&gt;
&lt;br /&gt;
Next, a bit fancier task:&lt;br /&gt;
&lt;br /&gt;
Run a loop where you try out different interpretations of he,this,she,it,... and for &amp;lt;b&amp;gt;each&amp;lt;/b&amp;gt; interpretation in the list:&lt;br /&gt;
&lt;br /&gt;
* represent it in otter format&lt;br /&gt;
* add common sense rules about the domain of news and  politics (ontology: like a taxonomy, can be a bit more complex)&lt;br /&gt;
* check whether otter generates a contradiction: if yes, then this is probably a wrong interpretation, since it does not match common sense rules.&lt;br /&gt;
&lt;br /&gt;
== What more you could do ==&lt;br /&gt;
&lt;br /&gt;
Instead of relying on your own handmade rules, you could use the json format data in conceptnet about objects to create a set of relevant rules automatically! You could use the wordnet for the same purpose. You could even use the http://wiki.dbpedia.org/ to get a large amount of real-world facts you could add to your knowledge base. &lt;br /&gt;
&lt;br /&gt;
This is what you could really get from conceptnet and wordnet and dbpedia: the main purpose why these databases/systems exist.&lt;br /&gt;
&lt;br /&gt;
This is not required for the lab, but if you manage to do it (ie. use some of these systems for creating relevant rules and facts automatically) we&amp;#039;ll award you extra points!&lt;br /&gt;
&lt;br /&gt;
== Examples to use as a starting point ==&lt;br /&gt;
&lt;br /&gt;
The following examples are in the Otter format: the first two are in the clause syntax and are similar to what&lt;br /&gt;
you are expected to in the third lab. The last one demonstrates formula syntax, calculation and probabilities (kind of).&lt;br /&gt;
&lt;br /&gt;
* [[Derive simple information about Obama]] &lt;br /&gt;
* [[Ask a query about Obama]]&lt;br /&gt;
* [[Output of first lab converted to second lab]] with a few rules added: can derive that Hyatt has type hotel and Obama is rich. [[Here is otter output of this example]]&lt;br /&gt;
* [[A question posed: find a mortal in the text]]: we just add &amp;lt;tt&amp;gt;-rdf(X,&amp;quot;id:type&amp;quot;,&amp;quot;mortal&amp;quot;) | $ans(X).&amp;lt;/tt&amp;gt; to the facts (i.e. a negated query with a variable and $ans to capture a suitable value for X.&lt;br /&gt;
* [[Probabilities and web scraping]] Determine the type of objects using information from a web page and probability-like measures.&lt;br /&gt;
&lt;br /&gt;
== How to create the Otter file and use the output ==&lt;br /&gt;
&lt;br /&gt;
* Split the example Otter file like obama1.txt into the initial part containing the strategy selection etc and the final part containing end_of_list.&lt;br /&gt;
&lt;br /&gt;
* Create the rdf data in Otter format automatically from the output of your parser in the previous lab.&lt;br /&gt;
&lt;br /&gt;
* In case you pose a question, add the negated question in the Otter format.&lt;br /&gt;
&lt;br /&gt;
* Compile the full intput file by appending these parts into a full input file myinput.txt:&lt;br /&gt;
** the prefix part, &lt;br /&gt;
** the automatically created rdf data in Otter format, &lt;br /&gt;
** the (optional) question in Otter format, in the negated form&lt;br /&gt;
** the commonsense rules and facts: either static handmade rules or rules/facts created automatically from conceptnet/wordnet/dbpedia&lt;br /&gt;
** the short final part ie end_of_list&lt;br /&gt;
&lt;br /&gt;
* Run otter like otter &amp;lt; myinput.txt &amp;gt; myoutput.txt&lt;br /&gt;
&lt;br /&gt;
* Process the myoutput.txt, filtering out derived stuff and/or determine whether the output contains the word PROOF&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
&lt;br /&gt;
[[lab 2 example code converted to give]] as a result the [[Output of first lab converted to second lab]]&lt;/div&gt;</summary>
		<author><name>Tanel</name></author>
	</entry>
</feed>