Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[2bd9a1]: doc / html / about_pyke / steps_to_using_pyke.html Maximize Restore History

Download this file

steps_to_using_pyke.html    193 lines (180 with data), 9.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Steps to Using Pyke</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../stylesheets/pyke.css" type="text/css" />
</head>
<body>
<table id="page-table">
<thead class="head">
<tr id="header1"><th id="header" colspan="3">
&nbsp;
</th></tr>
<tr id="header2">
<th id="crumb-left"></th>
<th id="crumb-line">
<div id="nav">
<ul>
<li><a href="../index.html">Home</a></li>
<li>&gt;</li>
<li><a href="index.html">About Pyke</a></li>
<li>&gt;</li>
<li>Steps to Using Pyke</li>
</ul>
</div>
</th>
<th id="crumb-right"></th>
</tr>
</thead>
<tbody id="body">
<tr id="body-tr">
<td id="left-nav">
<div id="left-nav-div">
<div class="title-nav"><a href="../index.html">Home</a></div><div class="nav-branch">
<div class="title-nav"><a href="index.html">About Pyke</a></div><div class="nav-branch">
<div class="normal-nav"><a href="cooking_functions.html">Cooking Functions</a></div>
<div class="normal-nav"><a href="what_is_pyke.html">What is Pyke?</a></div>
<div class="normal-nav"><a href="steps_to_using_pyke.html">Steps to Using Pyke</a></div>
<div class="normal-nav"><a href="installing_pyke.html">Installing Pyke</a></div>
<div class="normal-nav"><a href="modifying_pyke.html">Modifying Pyke</a></div>
</div>
<div class="normal-nav"><a href="../logic_programming/index.html">Logic Programming</a></div>
<div class="normal-nav"><a href="../knowledge_bases/index.html">Knowledge Bases</a></div>
<div class="normal-nav"><a href="../pyke_syntax/index.html">Pyke Syntax</a></div>
<div class="normal-nav"><a href="../using_pyke/index.html">Using Pyke</a></div>
<div class="normal-nav"><a href="../examples.html">Examples</a></div>
<div class="normal-nav"><a href="../PyCon2008-paper.html">PyCon 2008 Paper</a></div>
</div>
</div>
<div id="icons">
<div id="project-page">
<a href="http://sourceforge.net/projects/pyke/">Pyke Project Page</a>
</div>
Please Make a Donation:<br />
<a href="http://sourceforge.net/donate/index.php?group_id=207724">
<img src="http://images.sourceforge.net/images/project-support.jpg"
width="88" height="32" border="0"
alt="Support This Project" /> </a> <br /><br />
Hosted by: <br />
<a href="http://sourceforge.net/projects/pyke">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=207724&amp;type=14"
width="150" height="40"
alt="Get Python Knowledge Engine (PyKE) at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
</div>
</td>
<td id="main-td">
<div id="main">
<a name="startcontent" id="startcontent"></a>
<div class="document" id="steps-to-using-pyke">
<h1 class="title">Steps to Using Pyke</h1>
<ol class="arabic simple">
<li>You provide the following to Pyke's <a class="reference external" href="../using_pyke/creating_engine.html">knowledge engine</a>:<ul>
<li>A set of universally true <a class="reference external" href="../logic_programming/statements.html">statements</a>.<ul>
<li>These statements are true for all time.</li>
</ul>
</li>
<li>The text for all <a class="reference external" href="../knowledge_bases/question_bases.html">questions</a> that you might want Pyke to ask your end user.</li>
<li>Multiple sets of <a class="reference external" href="../logic_programming/rules/index.html">rules</a>.<ul>
<li>Your rules may include both <a class="reference external" href="../logic_programming/rules/forward_chaining.html">forward-chaining</a> and
<a class="reference external" href="../logic_programming/rules/backward_chaining.html">backward-chaining</a> rules.</li>
</ul>
</li>
</ul>
</li>
<li>Repeat for each specific use case:<ol class="arabic">
<li>You provide a set of <a class="reference external" href="../logic_programming/statements.html">statements</a> describing this specific use case to
Pyke.</li>
<li>You select which set of rules apply to this use case.</li>
<li>Pyke automatically runs all of the selected forward-chaining rules that
apply to the statements that you've given to it to deduce new statements.<ul>
<li>Your forward-chaining rules may interactively ask your end user
<a class="reference external" href="../knowledge_bases/question_bases.html">questions</a>, or get information by executing <a class="reference external" href="../knowledge_bases/special.html#running-commands">commands</a> (programs)
on the computer that it's running on to help in its decision
making.</li>
</ul>
</li>
<li>You ask Pyke a question by having it <a class="reference external" href="../using_pyke/proving_goals.html">prove</a> a <a class="reference external" href="../logic_programming/rules/backward_chaining.html">goal</a> (which is just
another statement). This goal may include <a class="reference external" href="../logic_programming/pattern_matching/pattern_variables.html">pattern variables</a> that
allow you to ask &quot;for what values is this statement true?&quot;.<ul>
<li>Pyke runs the selected backward-chaining rules against the statements
that it has in order to figure out the answer to your question.</li>
<li>Your backward-chaining rules may also ask your end user <a class="reference external" href="../knowledge_bases/question_bases.html">questions</a> and
run <a class="reference external" href="../knowledge_bases/special.html#running-commands">commands</a>.</li>
<li>You may have written Python code at the end of some of your
backward-chaining rules. For each such rule, Pyke has compiled this
Python code into a Python function called a <a class="reference external" href="../logic_programming/plans.html">plan</a> which it has attached
to the rule.</li>
<li>Once Pyke finds an answer to your question, it gathers all of the plan
functions of the rules that it used to find your answer into a
complete function call graph. The plan functions are linked together
mirroring the way that the rules were linked together to find your
answer. In this way, you can write high-level compilers that assemble
together and configure a set of Python functions to solve specific
problems.</li>
<li>Pyke returns the top Python function of this function call graph as a
standard Python function along with the answer to your question. You
may call this function as may times as you like. You may also <a class="reference external" href="http://docs.python.org/library/pickle.html">pickle</a>
the function so that you can send it to another program or save it to
disk. You only need one small Pyke module to load and run these
pickles.</li>
</ul>
</li>
<li>You <a class="reference external" href="../using_pyke/index.html#using-different-facts-for-different-cases">reset</a> Pyke to clear out all of these case specific statements and
prepare it for the next use case.</li>
</ol>
</li>
</ol>
<!-- ADD_LINKS MARKER -->
</div>
<!-- <div id="return-to-top">
<a href="#">Return to Top</a>
</div>
-->
</div>
</td>
<td id="right-nav">
<div id="right-nav-div">
<h3>More:</h3>
<div class="right-item"><a href="cooking_functions.html">Cooking Python Functions</a><p>Explanation of how Pyke &quot;cooks&quot; Python functions.</p>
</div>
<div class="right-item"><a href="what_is_pyke.html">What is Pyke?</a><p>An overview of Pyke's features.</p>
</div>
<div class="right-item"><a href="steps_to_using_pyke.html">Steps to Using Pyke</a><p>A brief list of the steps involved in programming in Pyke (with lots
of links).</p>
</div>
<div class="right-item"><a href="installing_pyke.html">Installing Pyke</a><p>System Requirements and installing Pyke.</p>
</div>
<div class="right-item"><a href="modifying_pyke.html">Modifying Pyke</a><p>Which source code repository to use. And the other tools that you'll
need run the units tests, and rebuild the html documentation.</p>
</div>
</div>
</td>
</tr>
</tbody>
<tfoot id="foot">
<tr id="foot2">
<td id="copyright" colspan="3">
Copyright &copy; 2007-2009 Bruce Frederiksen
</td>
</tr>
</tfoot>
</table>
<div id="last-modified">
Page last modified
Mon, Oct 27 2008.
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6310805-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>