Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

Download this file

steps_to_using_pyke.html    173 lines (161 with data), 8.5 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
<!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>
<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.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"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=207724&amp;type=3" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a> -->
<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=207724&amp;type=4" width="125" height="37" border="0" alt="SourceForge.net Logo" /></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" href="../using_pyke.html#initializing-pyke">knowledge engine</a>:<ul>
<li>A set of universally true <a class="reference" 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" 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" href="../logic_programming/rules/index.html">rules</a>.<ul>
<li>Your rules may include both <a class="reference" href="../logic_programming/rules/forward_chaining.html">forward-chaining</a> and
<a class="reference" 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" 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" href="../knowledge_bases/question_bases.html">questions</a>, or get information by executing <a class="reference" 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" href="../using_pyke.html#proving-goals">prove</a> a <a class="reference" href="../logic_programming/rules/backward_chaining.html">goal</a> (which is just
another statement). This goal may include <a class="reference" 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" href="../knowledge_bases/question_bases.html">questions</a> and
run <a class="reference" 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" 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" href="http://docs.python.org/lib/module-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" href="../using_pyke.html#setting-up-each-case">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>
</td>
</tr>
</tbody>
<tfoot id="foot">
<tr id="foot2">
<td id="copyright" colspan="3">
Copyright &copy; 2007-2008 Bruce Frederiksen
</td>
</tr>
</tfoot>
</table>
<div id="last-modified">
Page last modified Wed, Sep 24 2008.
</div>
</body>
</html>