Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Paul

Pages: [1] 2 3 ... 171
Mini Projects / Re: HTM.js
« on: April 19, 2017, 04:59:35 PM »
I added a demo for visualizing the temporal memory process.  This is useful for debugging problems with the logic (and also a good way to get a better feel for how TM works behind the scenes).

Mini Projects / HTM.js
« on: April 17, 2017, 01:26:29 PM »
I have decided to start cleaning up my javascript implementation of HTM and publish it on GitHub in case anyone finds it useful.  This is a lightweight implementation of HTM which can be run client side in the browser (useful for quick demos to explore and discuss various HTM-related concepts and theories).

I have committed the refactored code for spatial pooling and temporal memory, and added "HTM Piano" as an example of how to use it.  It is now up on GitHub

I'll be adding the code for sensory motor integration and reinforcement learning next, and I'll be including the source code for all of my future demos that use HTM.js as well.

Latest revision of master will also be deployed on the server.  This will provide easy access to the latest demos.

Theory and Discussion / Re: What is ARTUR?
« on: April 04, 2017, 04:27:44 PM »
I have decided on a target level of intelligence that I want to achieve, which will be used to seed the transmutation routine.  I will start with an AI that is capable of playing the first level of Super Mario Bros.  It doesn't necessarily have to play well, but should demonstrate that it is in fact learning from its experiences and improving at the game.  The AI obviously will not be written specifically to play Super Mario Bros (that would be too easy), and it will not start out with any knowledge about the game.  In other words, Super Mario Bros. is just the environment for testing the AI, but it could just as well operate in other simple NES games without modification.

Theory and Discussion / Re: HTM Reinforcement Learning
« on: April 04, 2017, 04:18:05 PM »
I have been active on Numenta's forum lately, but keep forgetting to post on my own forum :)  Let me give a quick progress update on how things are going.

The biggest epiphany for me came from realizing that the concepts of "imagination" and "curiosity" (which were the most biologically implausible elements of my original design) can be simulated by existing functions of a spatial pooler.

Spatial poolers currently simulate inhibition by selecting a percentage of columns that best connect to the current input space, and only those columns activate. A slight modification of this function allows it to replace my earlier concept of "imagination" -- selecting a percentage of columns that best connect to the most positive reinforcement input space, and only those activate. The columns in the motor layer map to the motor commands, so the winning columns drive what actions are taken.

Spatial poolers also have a function for "boosting", which allows columns that haven't been used in a while to slowly accumulate a higher score, and eventually win out over other columns that have been used more frequently. This can be used to replace my earlier concept of "curiosity". Actions the system hasn't tried in a while, such as new actions or those which previously resulted in a negative reinforcement, will eventually be tried again, allowing the system to explore and re-attempt actions that could lead to new outcomes.

I drew up a diagram to help visualize what the current design looks like:

The sequence and feature/location layers are complimentary -- both using the same spatial pooler (same columns activate for both layers) -- i.e. both receiving proximal input from the sensors. The sequence layer receives distal input from other cells in its own layer, while the feature/location layer receives distal input from an array of cells representing an allocentric location.

The motor layer receives proximal input from the reinforcement layer, via the modified spatial pooler which chooses a percentage of motor columns which have the highest reinforcement score with boosting. This layer receives distal input from active cells in both the sequence layer and the feature/location layer. Columns represent motor commands, while cells in the column represent the sensory context.

Columns in the reinforcement layer represent how positive or negative a reinforcement is. In my implementation, I am using columns to the left to represent more negative reinforcement, while columns to the right represent more positive reinforcement (with columns near the center being neutral). This is just to make it easier to visualize. Columns represent positivity/negativity, and cells in the columns represent sensory-motor context. Cells in this layer receive distal input from active cells in the motor layer.

My current design utilizes a two-layer circuit to pool reinforcement input. This tweak eliminates the need to extend reinforcement predictions backwards through time (handled now by a function of the temporal pooler), allowing the implementation to align even more closely with traditional HTM concepts.  Output from the reinforcement pooling layer is passed through the modified spatial pooler, which chooses a percentage of the motor columns which best map to the most positive reinforcement, with boosting.

There is still some more tweaking to do, but it is definitely starting to come together.  The most recent changes I got from watching the HTM Chat with Jeff.  One is the association of the sequence and feature/location layers. Location input itself, however, is currently just an array of input cells representing an allocentric location, which the feature/location layer connects to distally. Egocentric location is still missing, as well as tighter feedback between the two regions.  The other idea from Jeff's slides is the two-layer circuit which gave me the idea for configuring reinforcement feedback with a pooling layer.

General Discussion / Re: Custom Gamepad (and Touchpad) Layouts!
« on: April 03, 2017, 02:13:44 PM »
It doesn't look like a made a copy of those before the links went stale.

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: March 22, 2017, 07:45:51 AM »
Yeh, it seems that "fool proof" USB image isn't really very robust.  I only have two computers with LPT ports to test it on, so no doubt I haven't covered all (or probably even most) configurations that can be encountered.  I just need to finish writing my own ROM dumping application rather than relying on these ancient ones.

In my own experience, GSCC running on Windows XP tends to be much less stable than on Windows 98 or WINE, but it does work if you are persistent.  Glad to hear you were able to get it going.

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 23, 2017, 12:13:52 PM »
I'm having difficulties booting from the USB key. One third of the screen is black and the other part is a greenish background. I'll try to plug my monitor with a different cable... I hope it's only a video output problem... Since my screen goes strange, I guess the USB is booting after all... I had to run Ubuntu as a virtual machine instead of Lubuntu because the video output had artifacts...

Ok, let me know if you can't get it to work.  I can make a newer version based on latest Ubuntu LTS rather than outdated Lubuntu version I used for this one.  This older version is meant to support old computers (pre- Pentium M).

Theory and Discussion / Re: What is ARTUR?
« on: February 19, 2017, 06:20:33 PM »
Yes, the code changes will be done by the compiled program.  So memories of the challenges will in theory influence the changes that the creatures make.  You could think of the code editing phase as just another challenge.  The creatures are modifying a copy of their own code, but those changes apply to their offspring.  The better the scores of the offspring, the more likely those changes will be inherited by future generations.  Hopefully this will lead to "instincts" to improve on their own implementation (versus just making random changes).

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 18, 2017, 07:30:20 PM »
Oh, good catch I forgot about that step.  Mine was MSDOS.  Let me know if it works with GPT or if you have to go with MSDOS, and I'll update my instructions.

Support / Re: Where to get the latest .apk builds?
« on: February 15, 2017, 02:08:47 PM »
I'll work on getting the auto-builder updated.  Sorry I have been distracted by other projects :)

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 12, 2017, 05:57:28 AM »
Once you have successfully built your USB thumb drive, begin by restarting your computer and booting from it.  How to do this will depend on your particular system.  Typically you press some key during bootup that brings you into the bios settings, and there will be either a boot menu where you can boot from the thumb drive directly, or there will be a boot order list where you will want to move the thumb drive up to the top.

During bootup, you may see some strange graphical artifacts or the screen may go black for a while.  This is just Lubuntu adjusting to your computer's hardware.  Give it a little time, and it should eventually bring up a Lubuntu desktop.  If it never boots up, let me know.  I've only tested on three computers here, so I can't say how robust this is..

Once it boots up, you should see three icons on the desktop:

For the below instructions, use the password "gscc".

If you are paranoid about running this for any length of time on a computer with an open network connection, now might be a good time to change the password.  Open up a terminal (Accessories->LXTerminal) and enter:
Code: [Select]

The first thing you will want to run is "Configure LPT".  This will prompt you for a password.  Since you are running this from a USB thumb drive, you should only need to do this step once.  If you run this from a DVD later (when I get the ISO working) you'll need to do this every time you start the system.  If it is successful, you should see a message letting you know the parallel port is ready (the success message may or may not list the IRQ and base address):

Once the parallel port is configured, open the GSCC app to launch GSCC via Wine!

If you see an error message when you open the Configure LPT app, you will need to set up the parallel port manually.

"Configuring the parallel port manually": show

To check if your LPT port is active, first run:
Code: [Select]
sudo cat /proc/ioports | grep parport

If this does not produce any output, then continue.

Run the following two commands:
Code: [Select]
sudo modprobe -r lp
sudo modprobe -r parport_pc

Then run the following command:
Code: [Select]
sudo lspci -v
Look through the output for a block that starts with "Parallel controller".  Will look something like this:
Code: [Select]
03:06.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 64, IRQ 10
I/O ports at e000 [size=8]
I/O ports at d800 [size=8]
Memory at febfb000 (32-bit, non-prefetchable) [size=4K]
Memory at febfa000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [48] Power Management version 2

Note the two addresses that are on lines that start with "I/O ports at ..."  The first one is the base address of your LPT port.  Write this down somewhere for reference (will be different than in the above example).  Also write down the IRQ number (10 in the above example)

Next, run the following commands (replace e000 with the address you wrote down in the previous step):
Code: [Select]
sudo modprobe parport_pc io=0xe000
sudo modprobe lp

At this point, if you run the first command I listed earlier, you should now be getting some output:
Code: [Select]
sudo cat /proc/ioports | grep parport
To make the changes apply the next time you reboot (ONLY APPLIES WHEN BOOTING FROM THUMB DRIVE):
Code: [Select]
sudo nano /etc/modprobe.d/parport_pc.conf(This will typically be empty, since you are creating a new file).  Add the following lines to the file and save (don't forget to replace e000 with the address you wrote down earlier, and 10 with the IRQ number you wrote down):
Code: [Select]
alias parport_lowlevel parport_pc
options parport_pc io=0xe000 irq=10

Finally, edit the following file:
Code: [Select]
sudo nano /etc/modulesAdd the following lines and save (lp may already be in there, only add it if it is not):
Code: [Select]

That's it.  Reboot your computer and make sure everything worked by checking if you still get output from the first command I listed above:
Code: [Select]
sudo cat /proc/ioports | grep parport

"Reviewing the notifications after they disappear": show

If the notification didn't stay up log enough for you to read it, or if you want to take note of it later to post here for help, you can click on the notifications icon at the bottom-right of the screen:

"Parallel port not configured message when launching GSCC": show

If you get a message about the parallel port not being configured when you try to open the GSCC app, you may have to set up the parallel port manually.  If you have configured the parallel port manually but still see this message, launch GSCC from the terminal (Accessories->LXTerminal):
Code: [Select]
wine "C:/Program Files/N64Utils/gscc.exe"

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 12, 2017, 05:23:58 AM »
I haven't gotten the ISO working yet, so I'll go ahead and post the bootable USB thumb drive solution for now.

First, you'll need to have a USB thumb drive that is at least 4GB or larger.  This process will completely erase its contents, so be sure to backup anything you might have on it before starting.

Second, you will need Virtual Box with a Linux guest installed on it (I used Lubuntu to write the instructions below, but the process is virtually the same for Ubuntu if you have that as a guest instead).  We will be using Linux for the "dd" command used to build the thumb drive.  There are Windows programs that could do this as well, but I am more familiar with Linux.  You can always delete the guest or completely uninstall Virtual Box when you are finished if you need to save space.

Download the n64gscc.raw file.  I have set up a room on SpiderOak called N64 Utils where you can find a link to download it.

Once the file has been downloaded, copy it onto your thumb drive.  We are going to use the thumb drive initially to transfer the file into the Linux guest machine in VirtualBox (alternately, you could just download the file from inside the guest machine rather than from the host).

Go to your Linux guest machine settings, and add the thumb drive, under the USB section:

Now start up the Linux guest machine.  Once it has booted, open the thumb drive folder and drag the n64gscc.raw file onto your desktop.  This will take a long time to complete, so be patient.

Next, open up a terminal.  In Lubuntu, it is under Accessories->LXTerminal:

Install GParted by entering the following into the terminal:
Code: [Select]
sudo apt-get install gparted

When GParted finishes installing, launch it.  In Lubuntu, it should be under System Tools -> GParted:

In GParted, find your thumb drive in the drop-down selection at the top-right corner.  It will typically be listed as /dev/sdb but make sure it is the same for you (you can use the name and/or size to identify it.  Note if the letter for your thumb drive is not /dev/sdb (for example /dev/sdc or /dev/sdg).  You will need to know this later.

Once you have selected your thumb drive, right-click on the large rectangle that indicates the partition, and choose "Unmount" (note: if Unmount is greyed out, you can skip this step):

Next, right-click on the partition again and select "Delete":

Finally, click the green check mark to apply the changes.  It will warn you about loss of data (don't worry -- worst that could happen here is you could erase your Linux guest machine if you have the wrong drive selected, such as /dev/sda)

If your thumb drive has more than one partition (which would appear as multiple partition rectangles instead of just one), repeat the above steps to delete all of them.

Next, open up the terminal again (Accessories->LXTerminal).  Enter the following command.  NOTE: if you saw in the previous step that your thumb drive was some letter other than /dev/sdb (such as /dev/sdc or /dev/sdg), modify the command to match.
Code: [Select]
sudo dd if=~/Desktop/n64gscc.raw of=/dev/sdb
The above command will take a very long time to finish, so be patient.  When it is complete, shut down the Linux guest machine.  Your thumb drive should now be ready to use!

"Checking the thumb drive for errors": show

From your Virtual Box Linux Guest (with thumb drive plugged in), launch GParted (System Tools -> GParted), and select your thumb drive from the dropdown on the top-right (typically /dev/sdb).  Check to see if there is a warning icon:

If there is, right-click on the first partition and select "Check".  Click on the green check mark icon to apply the changes.

"Adding space to the thumb drive for everyday use": show

If your thumb drive is larger than 4GB, there will be a lot of wasted space after running the above process.  You can make this area available for everyday use (so that your thumb drive doesn't have to be dedicated to only running the N64 utilities).

To do this, launch your Virtual Box Linux Guest (with thumb drive plugged in), run GParted (System Tools -> GParted), and select your thumb drive from the dropdown on the top-right (typically /dev/sdb).

Right-click on the empty unallocated space in the partitions rectangle, and choose "New".  For the file system, select "fat32":

Click "Add", then click the green check mark icon to apply the changes.

"Restoring the thumb drive to its original state": show

If you want to completely remove the utilities from your thumb drive and restore it to its original (empty) state, start up your Virtual Box Linux Guest (with thumb drive plugged in).  Once it is loaded, launch GParted (System Tools -> GParted), and select your thumb drive from the dropdown on the top-right (typically /dev/sdb).  Right click on any partitions and choose "Delete".  Click the green  check mark icon to apply the changes.  The rectangle should now show only empty (unallocated) space.

Then right-click on the empty unallocated space and choose "New".  For the file system, choose "fat32":

Click "Add", then click on the green check mark icon to apply the changes.

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 11, 2017, 11:57:36 AM »
Another progress update.  Since my last post I learned that a true ISO image is in a read-only format called ISO 9660.  This means the output from "dd" is only a true ISO if the source is an optical disk.  Unfortunately, the output from dd with a hard drive or USB stick as its source cannot be easily burned to an optical disk.  It can only really be dumped onto another hard drive or USB stick (by simply running another "dd" command with the source and destination flipped).

In order to get a true ISO image that can be burned to a bootable DVD, things are a bit more complicated.  I found this guide on Ask Ubuntu, and just finished stepping through it.  My resulting ISO image however crashes after the Lubuntu splash screen, so I must have done a step wrong somewhere.  I've tried booting it in different modes, and from different machines, but all are having the same problem.

I'm going to try re-running the process from the beginning once more.  It took me a couple hours to get through the process the first round (granted, I was spending some time on each step Googling to learn its purpose).  If I can't get this working today, I'll post the output I have from dd, along with instructions for dumping it onto a USB stick.  Hopefully your computer is able to boot from USB.. if not, you may have to wait a while until I can generate a true ISO.

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 10, 2017, 08:39:18 AM »
Quick progress update.  I have created a bootable ISO image which has wine already configured, and has links on the desktop to GSCC and WinROM64.  This means there will be a very small number of setup steps (basically just configuring the computer-specific address and IRQ settings for /dev/parport0), then you can start using GSCC right away.  Doesn't require installing a second OS or using a VM.  It is built on Lubuntu 12.04, so it should run on even very old pre-Pentium M computers up through modern computers that have a parallel port.

I've tested on a bootable USB and it works well.  I've kept the image under 4 GB, so that it can be burned to DVD as well (since a lot of old computers are not able to boot from USB).  I haven't tested booting from DVD yet (have to make sure it will run fine on a read-only file system).  Once I finish those tests, I'll post the ISO and configuration instructions.

General Discussion / Re: How to backup ROMs from N64 cartridges
« on: February 09, 2017, 07:38:45 PM »
Don't resort to dual booting yet!  I've figured out a way to do this from a bootable CD or USB.  I am writing up instructions now, and will post them in a while.

Pages: [1] 2 3 ... 171