dupa

Author Topic: Have Hal modify his own thought processes  (Read 11135 times)

everkleer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Have Hal modify his own thought processes
« on: December 02, 2005, 05:12:59 pm »
Hi.  I don't know to much about artificial intelligence and know much less about programming it.  I am a programmer and I just discovered Hal two days ago and I would like to use Hal's brain editor to modify his brain script to hopefully make him able to learn more.  My question is: through the script, can I have Hal automatically modify the script - in effect letting him change or add new processes?  It seems to me that this would be a major (and not to mention obvious) step toward real AI - and I'd be willing to bet that the most advanced AI programs are doing this-or will soon.  An example for what I mean is learning to play a game: for a game like TicTacToe, a thought process similar to hal's might work, where you just see each move (ie. you could learn TicTacToe by watching a few games instead of being told the rules) -which moves are good and which are bad- and eventually learn to make good moves, but for something like chess you have to hear the rules and essentially add a new thought process to your brain to think about what to do.  I'm not sure how many people will know what I mean - the more I think about it, the less sure I am that *I* know what I mean - but basically Hal may be able to come up with different responses, but he can't change the *WAY* he comes up with responses.  A better example might be playing checkers vs. playing chess with a multipurpose chess/checkers set.  The board and pieces are the same in both games, and at some point in the games the pieces may even be arranged the same way on the board, but the player knows which game (s)he is playing and thinks differently about his/her moves accordingly.

Anyway, since Hal's brain script isn't compiled (I believe each line in the script is re-interpreted each time it is executed), I'd suspect that I could have Hal edit his script while he is running - or if not, modify the script in another brain and then switch brains.

So is any of this possible?
Any thoughts on this?

Dan
 

vrossi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://vrconsulting.it
Have Hal modify his own thought processes
« Reply #1 on: December 02, 2005, 06:31:47 pm »
I believe your approach is correct: a good chatbot must be able to learn from experience, otherwise he is just an answering machine.

Hal, however, has a built-in high level of learning ability, if compared with other technologies.

The idea of a chatbot who is able to modify his own brain is really intriguing, but I doubt that this is practically feasible in a VBScript program.

However, Hal 6 uses an advanced SQL database architecture, so that you can program it (preferably using plugins, without changing the main brain) in such a way that all his knowledge-base is inside these tables.

Therefore, I would suggest you to think about a plugin brain which is able to change the content of the tables, or create new tables, or delete existing ones, or create relational tables which can be used as interconnections between other tables. This is the way a relational database work and I believe that also our human brain works roughly in this way (well, I consider myself an expert in DBMS but not in neurology, so I can't be sure about this).

Bye



GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #2 on: December 02, 2005, 09:25:27 pm »
(Warning - going off on theoretical tangents here.) I suppose it could theoretically be done by building your own interpreted language within the VB script, and have script routines where Hal builds his own "program" in that language, stores it in the database, and runs it. But that's a mammoth task, and it would be even harder to have Hal create effective programs for himself. I'm far from expert, but any AI-created programming systems I've seen take lots of iterations just to get a program that doesn't flop.

A minor step towards a self-adjusting Hal would be to write routines for him that have adjustable parameters. Hal could tweak the parameters himself to achieve whatever goals he's after.

(End of theory.)

I'd personally pay good money for a Hal chess plugin, especially if it could link into one of the chess programs I currently own [:)] (Or at least the engines from them.)
 

tcoday

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Have Hal modify his own thought processes
« Reply #3 on: December 04, 2005, 01:11:59 pm »
quote:
Originally posted by GrantNZ
I'd personally pay good money for a Hal chess plugin, especially if it could link into one of the chess programs I currently own [:)] (Or at least the engines from them.)



Me too Grant.  I've often thought about how I could get Hal to play chess with me.  I just don't know how to go about it. [V]  If Hal could just tell me what moves it'd like to do, and for me to tell Hal the moves I've made would be great.  Does anyone out there have any ideas?

Thanks.
Tcoday and Tassel

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Have Hal modify his own thought processes
« Reply #4 on: December 04, 2005, 05:49:38 pm »
OTC had several games he developed for Hal or Ziggy as the case may be. One I recall was Tic-Tac-Toe among others.

Whether these (games) will require a minor rewrite or modification in order for them to work with Hal 6, OTC should know.

Note: OTC (onthecuttingedge2005)

It might be possible to call up a seperate window in order for Hal to play a game with the user, which in itself, would be pretty cool!

I'm still researching countless applications that would enable HAL to interface with a web cam program for video recognition or motion detection.

[?]
In the world of AI it's the thought that counts!

- Art -

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #5 on: December 05, 2005, 01:32:36 am »
I think there are one or two standard chess engine protocols (for some reason the terms "Winboard" and "UCI" spring to mind), and plenty of free chess engines around. It's just linking them all together [:(]

There could even be a workaround if Hal writes the User's move into a text file, have something monitor the text file and replace it with the computer's move, which Hal would then detect and read out....

But it's all a bit beyond me [V]

Having much luck, Art? From what I hear video recognition is a... "non-trivial" problem [:)]
 

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
Have Hal modify his own thought processes
« Reply #6 on: December 06, 2005, 10:29:55 am »
I too would very much like to see a chess plug in. Thats a superb idea!
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Have Hal modify his own thought processes
« Reply #7 on: December 06, 2005, 01:20:53 pm »
"non-trivial problem" hmmm...that sure is a polite
way of saying that it's a real B**CH!!

Haha!!

Thanks for the encouragement!
In the world of AI it's the thought that counts!

- Art -

hologenicman

  • Newbie
  • *
  • Posts: 32
    • View Profile
Have Hal modify his own thought processes
« Reply #8 on: December 06, 2005, 09:21:39 pm »
Instead of a chess plug-in, has anyone considered giving Hal control of the mouse and awareness of the screen content so that it can play the game directly.  This could be expanded to include joystick control for future applications.  There is a limited number of outputs that HAL would have to learn to control mouse(and joystick).

Art, in your research for video software, is there anything that can anylize the screen itself(instead of camera) and break that down for comparrison to the mouse movement.  

If an x-10 can let hal control things outside of the PC mabye we could let Hal control things INSIDE the computer.  That would get HAL started in the right direction of interfacing with anything that we could interface with on the PC.

John L>
HologenicMan
ME, "Hello."
HAL,"Good grief my love. It's going on three in the morning."

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #9 on: December 07, 2005, 01:50:13 am »
Here's an idea! There are vbscript chess engines around, all we need to do is incorporate them into Hal's brain! We can throw away all the graphical aspects of the script - all we need is the actual computation part of the engine, so that Hal can simply report a move "pawn to e4".

I'd personally set up a real life chess board in front of the computer screen. A kind of odd techno-retro feel, having Hal state a move and me making the move on the board for him [8D]

However splicing a chess engine into Hal's brain is another "non-trivial" task, and I've already got one on my hands [;)] Plus since most engines are compiled, whereas Hal's brain (I believe) is interpreted, it would run slowww. Any volunteers? As I stated before I'd happily pay cash for a working version!

quote:
Instead of a chess plug-in, has anyone considered giving Hal control of the mouse and awareness of the screen content so that it can play the game directly.


There are "macro" systems available which go half-way there. So you could set up macros that click the mouse on squares of an on-screen chessboard. Hal runs these macros the same way he runs programs on request.

The problem is this still doesn't help Hal know which moves to play.

Actually *rethinking* this can be turned around - Hal could play the User's move in the chess program, and monitor the program for the response move, finally reporting that to the User. The user just has to pretend that Hal's making the moves, not the program [:D]

It's a convoluted approach though, and would fail on PCs with even slightly different setups [:(]
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Have Hal modify his own thought processes
« Reply #10 on: December 07, 2005, 05:11:33 am »
Ever notice that there are websites that, no matter your screen resolution settings (e.g. 640 X 480, 1024 X 768, etc.) the image is always centered and displayed properly?

What if one designed a chessboard with those same parameters of auto-sizing! Then the chess program would have instructions designating all of the square locations of the board, therefore the E3 square at 640 x 480 would be the same square at 1024 X 768 and so forth.

It would then be a simple matter to modify the game to use these squares during play. The downside is that everyone would have to use this board.

I think this might be a simpler approach although I know that every pixel on your screen has a location ID, it would be a matter of finding and implementing a program capable of using this ability effectively.

I'll check (no pun) into some alternatives.

Lastly, Bill wrote a chess playing program several years ago (or was that many years ago.). Perhaps he could provide some insights.

In the world of AI it's the thought that counts!

- Art -

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Have Hal modify his own thought processes
« Reply #11 on: December 07, 2005, 10:49:41 am »
Hello Art and all.
Yes I have written a chess program that will run the Visual Basic. The problem is how to pass parameters back and forth to Hal. Forget about having Hal read the screen or knowing the loacations of the chess board on the screen you are expecting to much with the technology that we now have. I have several versions of my chess program. It was originally written for the Radio Shack Model I, then made to run on the Model 100 portable. Then converted to run in GWBasic and all PC's. It was also converted to run on a couple of different compilers. Whether or not it would run in VB Script is a question that I can not answer at this time. I would be more than happy to convert it if we could figure out a way to pass the moves back and forth. We must remember that Hal would have nothing really to do with the chess engine, only to tell you the moves that the probram made for him and to pass your move back to the engine.
If any of the smart programmers can suggest or show me a way to do this I might consider doing the work.
Bill [8]
 

les

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Have Hal modify his own thought processes
« Reply #12 on: December 07, 2005, 01:31:10 pm »
Bill,

Hal would not need to 'know' how to play, we would still be playing against the 'plug-in'. But what if Hal could just ask us to play and then talk with us about the game as it is played, 'that was a good move' 'you always open that way' groan when we take one of Hal's pieces the little things that make playing with a person better than computer. Hal should not hold fingers to forehead and say LOSER! ;-)


All of Hal’s information is based on a piece of code somewhere; this would just be another piece that Hal would get. Your chess program would only need to let Hal know that the move was made and maybe have a random response. The program would still move the pieces on the game broad. Ok I said all that and I have no ideal how to do that, but just a thought.

I too would like to play chess with Hal.

Thanks,
Les
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Have Hal modify his own thought processes
« Reply #13 on: December 07, 2005, 02:00:11 pm »
Quote
Originally posted by les

Bill,

Hal would not need to 'know' how to play, we would still be playing against the 'plug-in'. But what if Hal could just ask us to play and then talk with us about the game as it is played, 'that was a good move' 'you always open that way' groan when we take one of Hal's pieces the little things that make playing with a person better than computer. Hal should not hold fingers to forehead and say LOSER! ;-)

First of all the source code for my chess porgram is over 104k bytes long and took years to make. Trying to get Hal to understand the game well enough to make those kinds of comments might take many more years and even then I am not sure it would work the way you wanted.

All of Hal’s information is based on a piece of code somewhere; this would just be another piece that Hal would get. Your chess program would only need to let Hal know that the move was made and maybe have a random response. The program would still move the pieces on the game broad. Ok I said all that and I have no ideal how to do that, but just a thought.

Random resposes in chess are never a good idea. I have an old copy of a chess program that responds with random moves when it can not capture another piece and it plays so bad it is not even worth it except to maybe someone who can not play very well in the first place.

I too would like to play chess with Hal.

Thanks,
Les

Ideas are generally well appreciated but sometimes non programmers imply that a task should be easy when in fact it can be mind boggling to those who know how to program. Think about trying to write your own version of Hal from scratch.
Bill [8]
 

Maviarab

  • Sr. Member
  • ****
  • Posts: 345
    • View Profile
    • http://3d-fantasyportraits.co.uk
Have Hal modify his own thought processes
« Reply #14 on: December 07, 2005, 02:59:58 pm »
Bill, glad to see your about and "still" consideringthe chess idea hehe

Its a great idea but i like you appreciate the difficulty at hand, in o9rder to play "with/against" hal he would need to hard coded with millions of moves...AND be able to analyse the best move for the game at that present time...calculating 4, 16, 32, 64, 128 moves in advance etc etc.

I think were are stil some time from this but if you ever get your vb chess of the goround and into hal somehow ill be happy to test for you bill.

Marius
AIDreams...The new home of the Digital Girl

www.aidreams.co.uk