473,480 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Explaining how a (Mind) program works

"Bill Modlin" <mo*****@metrocast.net> wrote on Fri, 26 Sep 2003:
<snip>
If I wanted to explain how one of my programs worked
I would not give someone a print out of the code.
First I would explain it in higher level (folk psychology?)
terms and then explain how I embodied these ideas in actual code.
I'm not sure why - especially if the person you're explaining it to
is a programmer and knows the language.
BM: For the same reason that all good programs are liberally annotated
with comments. Programming languages are for controlling computers,
not for communicating with people. It is laborious and error prone
to attempt to discover the purpose of an algorithm implemented by
a bit of code just by inspecting that code. ATM:
Nevertheless the original source code has to be made available, e.g.
http://www.scn.org/~mentifex/jsaimind.html -- AI Mind in JavaScript;
http://mentifex.virtualentity.com/mind4th.html -- Mind.Forth PD AI.

BM: This is true even for the original author of the code.
Code that seemed crystal clear and obvious at the time
you wrote it is often indecipherable when a year later
you are called upon to adjust or fix it in some fashion.
ATM:
The factoring of Forth and the hierarchy of objects help here,
plus liberal comments and statements at the end of each Mind-
Module explaining to what other Module program-flow returns:
http://mentifex.virtualentity.com/progman.html -- Modules.

BM: Of course, the extensional function of each line of code is obvious
to anyone who knows the language. There is no mystery in a line of
code that says to increment the value of some variable by two:
it says exactly what is to happen. [...] Literal quoting of code is sometimes a useful adjunct to understanding
of function. We all generally like to have actual source to work with.
Yes, and so the AI4U (AI For Your) textbook of artificial intelligence at
http://search.barnesandnoble.com/boo...SBN=0595259227
contains a full source-code listing of the AI Mind-1.1 in MSIE JavaScript.
On September 24, 2003, a rather mean-spirited reviewer at B&N, hiding
behind anonymity, complained that "This book is not really a textbook
because it explains nothing. It rather is a collection of 'modules'
which the author expects the reader to implement" -- without pointing out
that the AI Mind modules are already implemented at the end of the book.

Now this author is indeed trying to get Minds coded in XYZ languages:
http://mentifex.virtualentity.com/cpp.html -- C++ with new AI code;
http://mentifex.virtualentity.com/java.html -- see Mind.JAVA #1 & #2;
http://mentifex.virtualentity.com/lisp.html -- Lisp AI Weblog;
http://mentifex.virtualentity.com/perl.html -- first Perl module;
http://mentifex.virtualentity.com/prolog.html -- Prolog AI Weblog;
http://mentifex.virtualentity.com/python.html -- Python AI Weblog;
http://mentifex.virtualentity.com/ruby.html -- Ruby AI Blog (OO AI);
http://mentifex.virtualentity.com/scheme.html -- Scheme AI Weblog;
http://mentifex.virtualentity.com/vb.html -- see "Mind.VB #001" link.

BM: But it is only an adjunct: the necessary ingredient for understanding
of non-trivial function is explanation of the principles of operation
in human-interpretable language.
ATM:
I have created every conceivable instrument of explaining the AI Mind.
http://mentifex.virtualentity.com/acm.html is Steps to DIY AI.
http://mentifex.virtualentity.com/standard.html -- AI Standards.
http://mentifex.virtualentity.com/variable.html -- AI Variables.

BM: Given the code one may never understand what it is for.
ATM:
Recently I have been meeting in person with an incognito engineer
who has volunteered to attempt to translate (port) Mind.Forth into
http://mentifex.virtualentity.com/aicppsrc.html AI C++ Source Code.

BM: Given an understandable explanation of just what is to be done
ATM:
Nothing beats having a one-on-one interactive discussion of
what is to be done to code AI and how to do it. That optimal
option is why I have a dreamworld fantasy of hiring out to CS
departments and AI labs to have my primitive but AI-coding
brain picked clean and dry of any contribution I make to AI.
and how to do it, any programmer can produce new code
for a function readily enough: having an actual worked out
version to go by is a dispensable luxury. [...]


A.T. Murray
--
http://mentifex.virtualentity.com/python.html -- Python AI Weblog
http://www.amazon.com/exec/obidos/ASIN/0595654371/ -- AI Textbook;
http://www.sl4.org/archive/0205/3829.html -- Goertzel on Mentifex;
http://doi.acm.org/10.1145/307824.307853 -- ACM SIGPLAN Mind.Forth
Jul 18 '05 #1
1 2167
On 26 Sep 2003 11:56:06 -0800, uj***@victoria.tc.ca (Arthur T. Murray)
wrote:
Programming languages are for controlling computers,
not for communicating with people.


Oh dear. I hope I never have to maintain any of your code :-(

Actually, getting serious, I'm not going to jump to any conclusions
about your coding style and I agree that access to the original
author/earlier maintainers/additional documentation can be a great
help when trying to understand code. It is easy to believe that your
code expresses the 'why' as well as the 'how' when you are familiar
with it, but to learn otherwise when someone else has to read it.

But still, I think that statement is simply false. Source code should
not just written to control computers, but also to be understood and
maintained by people.
--
Steve Horne

steve at ninereeds dot fsnet dot co dot uk
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
8482
by: anuradha.k.r | last post by:
hi, i am writing a socket program in python,both client side and server side.I've written the client side which is working perfectly fine(checked it against server program written in C).but as for...
11
2534
by: Arthur T. Murray | last post by:
Now, suppose that you wanted to write an AI in Python that would implement your mind-model and allow it to grow, mutate, develop. Here is one possible scenario. It would not be necessary to do...
42
1993
by: Mike P. | last post by:
Hello I come from the world of C++ programming, and I'm used to writing programs that are actually executed by the CPU, and that run with some semblance of performance. I have taken the time to...
8
2748
by: Jerry Khoo | last post by:
hello, everybody, i am kinda new here, nice to meet u all. Now, i am cs students and are now facing difficult problems in understanding what a binary tree is, how it works, and the algorithm to...
8
1956
by: Will Chamberlain | last post by:
I came across a rather interesting article this morning and thought I'd share. We all know that Visual Studio is a great IDE, but I think we can all agree that it is adds a dramatic change to how...
11
2186
by: Wayne | last post by:
I am a one man enterprise and have been asked by a prospective client what happens to their database regarding ongoing changes etc if I get hit by a bus. Obviously my databases are distributed...
4
2522
by: dhilipsiva | last post by:
hi all! I've developed a mind reader program using C . By showing you trails of two slides it will determine the value that u r thinking in ur mind (0-99). those who intrested in this program...
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6732
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4472
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.