General challenge for site members
|
06-21-2024, 03:54 PM
Post: #1
|
|||
|
|||
General challenge for site members
Hi All,
We enjoy tinkering with various types of calculations such as pi (to many decimals), log(2), and other functions. But as I look to what is happening in the world of computer software, the focus seems on AI, machine learning, and deep learning! It seems out there no one really cares about rehashing known mathematical constants and functions like log, sin, and so on!! My general challenge is to push machines like the HP-71B (with MATH ROM?), HP-42s (and variants), and the HP Prime to implements even low-end machine learning algorithms. Any chance that we can make these calculators rise to meet the AI challenge? Namir |
|||
06-21-2024, 07:13 PM
Post: #2
|
|||
|
|||
RE: General challenge for site members
Contemporary "AI" seems to be based on linear algebra. With enough memory, and a matrix multiplication routine, you could do something. Recognising the digits 0-9 in noisy images is a possible starting point, although even that might be too demanding.
|
|||
06-21-2024, 07:36 PM
Post: #3
|
|||
|
|||
RE: General challenge for site members
I faintly recall seeing a Hexapawn game (mini chess on a 3x3 board) for the HP 65 that learns the optimal moves to make as you play against it. I think it might have been in one of the earlier issues of PPC Journal.
|
|||
06-21-2024, 07:56 PM
Post: #4
|
|||
|
|||
RE: General challenge for site members | |||
06-21-2024, 09:08 PM
Post: #5
|
|||
|
|||
RE: General challenge for site members
Hello,
here is a simple version of ELIZA, the artificial psychiatraist, so to say the mother of all natural language communication software. Written for the HP-71B by ChatGPT: Code: 10 ! Simple ELIZA program for HP-71B Good night Max |
|||
06-22-2024, 02:48 AM
Post: #6
|
|||
|
|||
RE: General challenge for site members
(06-21-2024 07:13 PM)EdS2 Wrote: Contemporary "AI" seems to be based on linear algebra. We can consider linear regression a very simple form of machine learning. From this perspective the HP-42S has it already built in:
Apparently some eccentric professors of numerical analysis used that when they woke up in the morning and felt feverish. |
|||
06-22-2024, 11:01 AM
(This post was last modified: 06-22-2024 11:01 AM by Namir.)
Post: #7
|
|||
|
|||
RE: General challenge for site members
How about classification algorithms like the k-nearest neighbors algorithm and the k-means clustering? I think the HP Prime can implement it.
Namir |
|||
06-22-2024, 12:07 PM
(This post was last modified: 06-22-2024 12:11 PM by Maximilian Hohmann.)
Post: #8
|
|||
|
|||
RE: General challenge for site members
Hello,
or a simple neural network? „Please write a program for the hp-71b based on a neural network to predict results in the British premier league from previous games“ Answer: Creating a neural network on an HP-71B is quite challenging due to its limited computational resources and memory. The HP-71B is a vintage calculator/computer from the 1980s with a BASIC-like language, and it was not designed for complex tasks like neural networks. However, I'll provide a simplified version of a program that could predict outcomes based on some basic statistics, which might give you a rough idea. ... AI generated statistics based program omitted ... Next question: „Thank you, assume that the hp-71b has 64kBytes of RAM extension, would a neural network solution be feasible“ Answer: Even with 64KB of RAM, implementing a neural network on the HP-71B would be challenging due to its processing power and limitations in handling complex arithmetic operations efficiently. However, a very simple neural network might be feasible, especially if you restrict the network size and training data. Here is an attempt at a basic neural network implementation for predicting outcomes in the British Premier League. ... Implementing even a simple neural network on the HP-71B is an educational exercise in understanding the limitations of vintage hardware and how computational constraints shape the design of algorithms. For practical purposes, more modern hardware and software environments are recommended for machine learning tasks. ... more detailed explanations omitted ... So here it is, the neural network for predicting football results: Code: 10 DIM W(2), X(2), Y(2) Unfortunately I have no way of transfering this code from my Macintosh to the HP-71B other than typing it in (which is what I would have done 40 years ago but these days are over) to see how well it ppredicts. Regards Max NB: Just out of curiosity, I asked one more question: „Could you squeeze in a second layer of the neural network if the RAM were exteded to 128kB?“ Answer: With 128KB of RAM, it is more feasible to implement a small neural network with a second layer on the HP-71B. However, the HP-71B's processing power is still quite limited, so the network will have to remain very simple. We can add a hidden layer to the neural network with a few neurons. The resulting program is quite long and would really be interesting to try out... |
|||
06-22-2024, 06:47 PM
Post: #9
|
|||
|
|||
RE: General challenge for site members
There is an excellent (2 part) article on implementing neuronal networks on the HP48G(X) including program code by Peter Gatenby:
Neural Networks Part I: Feedforward Hardlimited Networks (V21N1P36) Neural Networks Part II: Learning by Back-propagationm (V21N2P10) The articles can be read here: https://www.hpcc.org/calculators/hp48.html Good luck, Juergen |
|||
06-22-2024, 09:39 PM
Post: #10
|
|||
|
|||
RE: General challenge for site members
(06-22-2024 06:47 PM)JurgenRo Wrote: There is an excellent (2 part) article on implementing neuronal networks on the HP48G(X) including program code by Peter Gatenby: Impressive use of the HP48GX. Nice article. Namir |
|||
06-23-2024, 06:02 PM
Post: #11
|
|||
|
|||
RE: General challenge for site members
I wrote a program for the HP50g (and an earlier but more limited) for the HP41c that would play rock-scissors-paper against a person. It would learn quickly and win around 70%+ after about a dozen games. I extended it to rock-scissors-paper-lizard-Spock but that performed the same.
I looked at the last choices the opponent made vs the history. For a 3-level history, this takes 27 memory slots. I had a system that rewarded the correct choice and penalized wrong choices. It was hard to beat. I did manage to score evenly against the program using a base 3 pseudo-random number generator with good statistics and a very long cycle (too long for my program to learn.) Running about 100 of my pseudo-random choices a second time would end up losing. |
|||
06-23-2024, 10:47 PM
Post: #12
|
|||
|
|||
RE: General challenge for site members
I think the RPL calculators (with their support for lists) have a better chance to use more sophisticated data structures than can store data adequate for machine learning algorithms.
Namir |
|||
06-24-2024, 06:58 AM
(This post was last modified: 06-24-2024 07:02 AM by Mr_F.)
Post: #13
|
|||
|
|||
RE: General challenge for site members
There's a neural network program for the Prime, author Mark Power, at hpcalc.org
https://www.hpcalc.org/details/9101 Related link in this forum https://www.hpmuseum.org/forum/thread-14227.html - Geoff |
|||
06-24-2024, 07:57 AM
Post: #14
|
|||
|
|||
RE: General challenge for site members
I wrote a tic-tac-toe program for a TI-58 in 1979. It'd beat you every time if it went first, unless you made the correct play to force a draw. And if you went first, it would always draw. But that's not even a micro-version of AI, it'was simply a programmed code to achieve a deterministic outcome.
A couple of years before, I had made a vehicle that would hunt around the floor looking for bright things. If it hit something, it would remember which side it hit, back up a little (unless it reversed into something else), and then steer around the object to carry on its journey, at which point it forgot what it had hit last time. So it had three memory neurons, to learn and remember if it had just hit something on the right, or on the left, or at the back. All discreet transistors, just because.... Back to calculators, and to qualify as a version of AI, we'd need to define what AI is? Is it a system that can learn through experience, and use that knoledge to produce steadily improved outcomes in some task, by whatever criteria is set for it? Statistical functions could be a basis for this, whereby a steadily accumulating set of data could lead to better and better predictions about future data. eg, a set of numbers between 2 and 12, which are actually generated by throwing two dice, but we dont know that. Experience of a string of such values will let it learn the likely probability of each outcome. And if betting with some odds were presented to it, it will learn when to play and when to hold. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)