Subject: another ADB idea
To: None <port-mac68k@NetBSD.ORG>
From: Rick Hawkins <rhawkins@iastate.edu>
List: port-mac68k
Date: 07/16/1996 18:31:05
Thinking some more about the adb problem, another idea has hit.  So stop
me where it goes wrong :)

As i understand the approach that used the mac roms, the porblem is that
it is necessary to pre-initialize memory locations, but are unable to
tell what variables are required on which models.  Am i ok so far?

I assume that we have a list of candidates for these addresses, but
can't determine which values are required, and which are consequneces of
current actions, preventing us from finding the exact values to start
with.  (otherwise, we would simply read these values under macos, & use
them). 

Given that an adb-less kernel is possible, i'll take a wild gues that
the file system either is, or could be made to, be available prior to
loading the adb driver.  [if not, this whole idea is useless]

Assuming that I'm ok so far, I'm thinking of using a genetic algorithm
to find working values.

When the adb driver initializes, it would first enter the hack.  It will
read the file "pass", retrieving the number therein, then increment that
number.  It will then use that number to retrieve a candidate solution
from the file "population", and install these values.

we also hack the adb driver, so that it writes an additional checkpoint
line to the file "results.thispass", (forced write; flush it), to see
how far each versiongets.

I'm assuming that it will hang, but i'm hoping that it hangs at
different points (otherwise, this is again pointless).

The system would then receive a hardware reset after a predetermined
time (enough to crash/hang).  Building something to poke the button
shouldn't be too hard . . . i suppose i could jury-rig the contacts from
the switch to the relay in my old tandy 102.  or, for that matter, can
other processes survive the hang?  If so, let one of them do the
shutdown . . .

Anyway, eventually the whole set of candidates get sorted through.  Each
member of the population is given a fitness score.  At this level, it
would be the highest checkpoint reached.  

>From this population, a new generation is created.  As an initial guess,
I would use tournament selection with crossover & mutation.

Under this scheme, the population is randomly divided into groups of
four.  In each group, the members with the two lowest scores are tossed,
the two best are kept, and two more are created by splicing the
bitstrings at a random point, and possibly introducing a random
mutation.

Generally, there will be a rapid convergence to the correct solution.


Anyway, if my initial summation of the problem is correct, i think this
solution will work.  I understand & research GA's, and I can also tap on
a couple of the top minds in the field.

But is anyone willing to hack the driver for this?  If so, i have a 180
with a broken keyboard that doesn't have much of anything better to do,
anyway.  

Also, can the ramdisk be supported as a boot disk for this?  It would
speed things immensely (I've got 14M).

Anyone game?


rick

ps:  the other idea that occured to me is to flesh this out a bit more,
have someone who understands the technical adb problem edit & elucidate,
and then forward to apple, commenting on what a wonderful paper this
will be to publish, with the faint hope that they'd rather hand over the
data than see the paper . . . :)