tag:blogger.com,1999:blog-46194552112669198342024-03-12T18:21:04.390-07:00GOFAI in C and C++ [ dsm32(at)cornell.edu ]good old-fashioned artificial intelligence (GOFAI) through natural language interactiondsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-4619455211266919834.post-40288591190970346572017-09-06T06:21:00.002-07:002017-09-06T06:22:49.795-07:00Happy Douglas Adams September To All!<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgonZsEAEBE-mKH7DJ1USKJv3KJJks00vG4Yq6tON4slkpl_vSppESgKBi0fnzFW59adQfS2XPBdhVn-pyyL1goD0smMwpnj0WCWyIj74QO3B76KN7WL3nNPkHuodudXl58K2jmQ6QUM1JR/s1600/douglasadams-xxlarge_trans_NvBQzQNjv4BqZgEkZX3M936N5BQK4Va8RWtT0gK_6EfZT336f62EI5U+copy.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1000" data-original-width="1600" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgonZsEAEBE-mKH7DJ1USKJv3KJJks00vG4Yq6tON4slkpl_vSppESgKBi0fnzFW59adQfS2XPBdhVn-pyyL1goD0smMwpnj0WCWyIj74QO3B76KN7WL3nNPkHuodudXl58K2jmQ6QUM1JR/s400/douglasadams-xxlarge_trans_NvBQzQNjv4BqZgEkZX3M936N5BQK4Va8RWtT0gK_6EfZT336f62EI5U+copy.jpg" width="400" /></a></div>
well, a little more than halfway through editing a Word document (created from an Amazon Kindle ebook) of Douglas Adams's <i>The Long Dark Tea-Time of the Soul</i> to conform to the audiobook he himself recorded for it.<br />
<br />
first, i had to clean up the audiobook itself a bit:<br />
• inserting "Chapter X" (where X is a number from 1 to 35) at the beginning of each chapter (borrowing the audio mostly from his audiobook of <i>Dirk Gently's Holistic Detective Agency</i> and "Chapter 1" from his audiobook of <i>So Long And Thanks For All The Fish</i>);<br />
• repairing a number of words which had gotten cut off halfway through (often at the end of tracks) or were otherwise incomplete — only having the 'hoke' <hoke> part of "hoax" but not the 'ks' <ks> sound at the end, for instance;</ks></hoke><br />
• inserting small silences between chapters to help with the flow;<br />
• and deleting the commercial branding of the previous (now defunct) copyright holder.<br />
<br />
now i'm closely listening to the recording and altering the text in the Word document to more precisely match the recording.<br />
<br />
and i'm making footnotes to document each change and/or to give the original text in the ebook that has been omitted or changed in the audiobook; this is the part that takes some time.<br />
<br />
like i said, i see this as Douglas Adams's final edit of the book. next, i plan to do <i>Dirk Gently's Holistic Detective Agency</i> and eventually move on to the five books of the <i>Hitchhiker's Guide To The Galaxy</i> series.<br />
<br />
when i've finished <i>Long Dark Tea-Time</i>, i may work on some software which could quickly (i hope) move through the AIFF audio files and extract the audio for a given sample of text from the book — sort of an on-demand Douglas Adams voice. it would be limited to text which appears in the book, but i'd be interested in the results; if it's successful, it could be expanded to include more books as i edit their corresponding documents to match their Douglas-Adams-read audiobooks — that's the main point of creating a text that very closely matches.<br />
<br />
Happy September!<br />
<br />
[the above post was copied directly from a dsm32 post:<br />
<a href="http://dsm32.blogspot.com/2017/09/happy-douglas-adams-september-to-all.html" rel="nofollow" target="_blank">http://dsm32.blogspot.com/2017/09/happy-douglas-adams-september-to-all.html</a> ]<br />
<br />
and i've been having fun getting used to Douglas Adams's voice; i hope to create some kind of sound-frequency / volume envelopes from his sentences which can then be applied to syntactically identical sentences uttered by a voice synth — will be interested in how it comes out, especially on the CereProc Scottish 'Heather' voice!</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-50056300266183130802016-12-02T14:26:00.000-08:002016-12-02T14:48:42.667-08:00A New Voice<div dir="ltr" style="text-align: left;" trbidi="on">
thanks to CereProc / CereVoice, the AI project now has a Scottish accent, via a free voice (Heather) they provided for my academic research.<br />
<br />
you can try out a variety of voices at their website -- type in text in the window at the very top of your screen and select a voice. they rock!<br />
<a href="https://www.cereproc.com/en/" target="_blank">https://www.cereproc.com/en/</a><br />
<br />
the voice is a *big* improvement over those provided with Mac OS, and i've just begun to explore articulation of Heather's voice. (and determining the proper way to speak a text can provide some computational-emotional info for that text.)<br />
<br />
more steps at storing input & output in text files; indeed, much of the speech is performed with temporary text files with the CereProc software (via Python).<br />
<br />
progress!</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-88684158212377258442015-07-20T16:57:00.002-07:002015-12-20T11:48:48.052-08:00Text Interpretation<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="p1">
• input a text; then interpret the text (w context), because interpretation gives meaning to text. but don’t worry too much about the "accuracy" of interpretation — make a first approximation to use (later) and check consistency w other texts.</div>
<div class="p1">
<br /></div>
<div class="p1">
• the reason to store text (and all texts read are stored) is to go back later and re-interpret the text — the meaning will change over time! the first interpretation of a text (and the second, and the third, and the …) is not ultimately useful except as a starting place. deeper understanding comes through comparing interpretations made at different times.</div>
<div class="p1">
<br /></div>
<div class="p1">
• over time, the meaning of a text evolves for each reader.</div>
</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-7228529855699597502015-07-17T16:49:00.000-07:002015-07-17T16:51:56.516-07:00Listen-Respond Loop<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="p1">
have been shaping an approach for the main (foreground) program and the A.I.'s listen-respond loop:</div>
<div class="p1">
<br /></div>
<div class="p1">
(in addition to the emotion, memory & association, natural language comprehension & expression, and virtual body programs, all running in the background)</div>
<div class="p2">
<br /></div>
<div class="p1">
1) Input (aka Listen or Hear or something like that, for internal or external text)</div>
<div class="p1">
2) Feel (get emotional response from emotion program, influence of memory & association)</div>
<div class="p1">
3) Think (use “soft” truth-functional logic w suggestions from association & memory to derive possibilities)</div>
<div class="p1">
4) Respond (put it all together and fashion a response, or lack thereof; store in memory)</div>
<div class="p1">
5) Repeat</div>
<div class="p2">
<br /></div>
<br />
<div class="p1">
let me know what you think.</div>
</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-38340555854200322202015-06-22T18:39:00.001-07:002015-06-23T04:18:07.965-07:00Text File I/O, Computational Emotions, & Data Structures of Consciousness<div dir="ltr" style="text-align: left;" trbidi="on">
lots of preliminary work this week -- I/O streams (and how to label, manage, & coördinate them), deciding on what emotions to run feedback models of for the computational consciousness, and beginning to come up with appropriate data-structures for various aspects of thought, memory, and association (all affected to some degree by emotion).<br />
<br />
i'm not trying to be entirely faithful to the details of human neurobiology, but the broad strokes of what we understand of that field will be most helpful in assembling a system that can achieve some level of understanding both our world (through text) and herself.<br />
<br />
i want my AI to be able to "name & claim" its emotional responses to what she reads; i don't want her to read (except at first) in a vacuum. the more she reads, the more context she'll have for what she reads next. (and everything she reads will be stored in some variation of text file; her memories and associative matrices will also be in some sort of n-dimensional text conglomeration.)<br />
<br />
joy, sadness, surprise, love, anger, fear, desire, disgust, & contempt — that's a rough list of primary human emotions. any suggestions for others to add? then the question is learning how to express these in words (and to experience these <i>from</i> words). and decide how much to drive thought by emotion — more as time goes on, as emotion can be more trusted.<br />
<br />
and then how to integrate memory storage & recall into a roughly logical framework with a mediation by emotions and associations and some degree of randomness (or more complex associations which might appear random).<br />
<br />
a lot of speech is answering questions about the self and about one's own thoughts. add the facility to develop increasingly sophisticated models of the (apparent) thoughts and motivations of others (who the AI will meet through text), and we're well on our way.<br />
<br />
more than enough to think about this week. (this is just the beginning!)</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-87157719897876296482015-06-08T18:44:00.001-07:002015-06-12T04:51:09.564-07:00Text-To-Speech from UNIX (and then from C++ on UNIX)<div dir="ltr" style="text-align: left;" trbidi="on">
Figured out how to do text-to-speech from the UNIX command line (using the built-in voice synthesizer) using the "say" command, plus:<br />
• how to choose a voice (Vicki sounded best to me) from the command line<br />
• how to use the "say" command from within a C++ program, using the system() function<br />
• how to speak the contents of a text file from within a C++ program (which may be the interim solution, until i can figure out how to speak, for instance, the contents of a string variable)<br />
<br />
After all, an AI has to have a voice! (Or at least it would be nice, if it's not too difficult.) Doing speech recognition is another thing, but not out of the realm of possibility.<br />
<br />
And the new computer is *so* much faster! Yay ! ! !<br />
<br /></div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-63997688678234005122015-06-01T15:00:00.000-07:002015-06-02T18:03:37.042-07:00first steps in C++ for the text AI<div dir="ltr" style="text-align: left;" trbidi="on">
thinking of creating a Word class, a Phrase class, a Sentence class, a Paragraph Class, a Section class, and perhaps a Book class so that my AI can process (or ingest :-) text. will i need a Character class? we'll see...<br />
<br />
don't just accept a text (except to put it in memory initially); question it again and again!<br />
<br />
• store input in memory, translate into i-language (and store that too)<br />
• recall possible relevant memories into workspace<br />
• process all in workspace & integrate into (temporary) conclusion(s)<br />
• if no new input, then go back over and take different analytical paths<br />
• or add new input to workspace analysis & start again</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-60981730273121631712015-05-09T17:44:00.001-07:002015-05-09T17:48:32.674-07:00Fundraiser & New Progress<div dir="ltr" style="text-align: left;" trbidi="on">
Have started a GoFundMe fundraiser for a new computer system; my old one from 2009 is not so fast anymore.<br />
<br />
And i have a better idea of the five-pronged approach i'll be using for the AI (whom i'll have to name soon — can't just keep calling her "the AI") [paraphrased from a write-up by Mary Evans]:<br />
<div style="text-align: left;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">T<span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;">he system has to be able to run five custom-written programs (in the background) simultaneously on UNIX: one each to handle emotion, logical thinking, associative thinking, natural language expression, and memory (and anything else i find to be necessary). </span><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;">And since proper understanding and empathy requires some sort of virtual body</span><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;">, i plan to add graphics of a face & body for the AI (and a camera to view the user).</span></span></div>
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;"><br /></span></span>
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;">Thank you to everyone for all of your support, both financial and emotional. Time to get back to work!</span></span><br />
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;"><br /></span></span>
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;">The fundraiser website is: <a href="http://gofundme.com/GOFAI">http://GoFundMe.com/GOFAI</a></span></span><br />
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;"><br /></span></span>
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: white; color: #222222; line-height: 18.4799995422363px; text-align: justify; text-indent: 24px;">Namaste.</span></span></div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-26095549690886430102013-07-26T10:19:00.002-07:002013-07-26T10:19:44.286-07:00Thoughts in C++<div dir="ltr" style="text-align: left;" trbidi="on">
Am converting my copy of Eric Baum's <i>What Is Thought?</i> to an ebook — it'll be great to have it on my Kindle; it's good practice for me at ebook production (from scans to PDFs to a Word doc to a Kindle ebook), and it's a great way of forcing myself to closely read every sentence (and word).<br />
<br />
And as i'm doing the conversion (and reading the book), i'm thinking of the material in terms of writing C++ functions & libraries for my own word-based GOFAI software.<br />
<br />
What FUN ! ! !<br />
<br />
(And the debate on the legal propriety of ebook conversion is to me entirely moot, as there <i>is</i> no ebook for <i>What Is Thought?</i> otherwise available.)</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com3tag:blogger.com,1999:blog-4619455211266919834.post-85828032200403292182013-07-16T10:50:00.001-07:002013-07-16T11:18:24.899-07:00Eric Baum's WHAT IS THOUGHT?<div dir="ltr" style="text-align: left;" trbidi="on">
OK, time to get this blog going!<br />
<br />
There's a class this fall at Tufts University—Comp 150-01 "The Evolution of Cognitive Processes"—that i really wish i could take. It's an interdisciplinary look at Eric Baum's book, <i>What Is Thought?</i>, which i recently borrowed though the local library's virtual catalog and then purchased a copy from Amazon (for only $15, delivered!).<br />
<br />
Who knows if i'll have the time or money to attend, but at least i can read the book (and work on C++ implementations of what interests me). It's pretty good stuff, what i've read so far.<br />
<br />
Gives me more stuff to think about when i go running each morning (my meditation time). Even before starting the book, i'd already begun to work up my ideas of IdeaSpace and ThoughtSpace using words as atoms in an implementation of creativity and dreaming.<br />
<br />
Thank you for your patience at my dilatory start to this blog!<br />
<br />
Ciao!<br />
<br /></div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0tag:blogger.com,1999:blog-4619455211266919834.post-14272216671513926632013-02-03T09:02:00.001-08:002013-02-06T07:28:54.870-08:00Coming Soon!!!<div dir="ltr" style="text-align: left;" trbidi="on">
Coming Soon to this URL: a blog about Good Old Fashioned AI (in the languages C and C++ particularly).<br />
<br />
I was a physics major; that didn't work out so well, so i went into Planetary Science.<br />
<br />
That also didn't work out so well, so i went into English.<br />
<br />
That worked out fine, and i graduated.<br />
<br />
Then i did some work in symbolic logic. And i had the idea of doing AI using natural language, with an underlayment of symbolic logic.<br />
<br />
Then i did some work in linguistics — syntax, mostly.<br />
<br />
Then some work in computer science, in Java.<br />
<br />
Then C++ . . . and now i'm trying to wrap it up into one messy package!!! (I was tempted to say 'neat' but it's obviously going to be messy. :-)<br />
<br />
So here we go!</div>
dsm32http://www.blogger.com/profile/01585106015244094998noreply@blogger.com0