comp.lang.ada
 help / color / mirror / Atom feed
From: Charles Hixson <charleshixsn@earthlink.net>
Subject: Re: asynchronous task communication
Date: Wed, 02 Jan 2013 11:02:54 -0800
Date: 2013-01-02T11:02:54-08:00	[thread overview]
Message-ID: <6bqdndEYjoxeGHnNnZ2dnUVZ_sadnZ2d@earthlink.com> (raw)
In-Reply-To: <rui4vsmhmvoy$.1091h5zc4iw9o.dlg@40tude.net>

On 01/02/2013 01:55 AM, Dmitry A. Kazakov wrote:
> On Tue, 01 Jan 2013 23:36:13 -0800, Charles Hixson wrote:
>
>> On 01/01/2013 10:54 AM, Robert A Duff wrote:
>>> Charles Hixson<charleshixsn@earthlink.net>   writes:
>>>
>>>> ...I really preferred a language with a garbage collector,
>>>
>>> I have used the Boehm garbage collector successfully with Ada.
>>>
>>> You could also consider use-defined storage pools.
>>> I don't know enough detail of what you're doing to know
>>> if they would help.
>>>
>> I don't think storage pools would help, though I admit I don't
>> understand them.
>
> Storage pools allow implementation of arenas and stacks which are extremely
> useful when dealing with graphs. I don't know how many nodes you have, but
> in my system a decision tree might have hundreds of thousands of nodes.
> Merely finalization of such a structure would take a lot of time if nodes
> are allocated in the standard memory pool.
>
>> Actually, for the current project the need for garbage collection is
>> minimal...but I often do things where garbage collection really
>> simplifies memory management.
>
> Not really. And for graphs seems just the opposite.
>
> Though you would need to carefully design for which graph edges the
> references will be strong and which ones weak.
>
>> Even on this one I'm going to need to
>> figure out how to recycle memory with Ada.Collections.Vectors attached,
>> as different cells will connect to differing numbers of other cells.
>
> Variable structures like Ada.Containers usually allocate memory in advance
> to speed up incremental insertions. For NN I would consider a custom
> fixed-size structure.
>
> You might also consider refactoring subgraphs. Structures like that tend to
> combinatorial explosion when the same graph pattern keeps on repeating
> itself. Memory use and training/classification times could be reduced when
> repeating subgraphs are shared rather than replicated. This is another
> argument to consider a custom implementation.
>
A constant size container is not reasonable...though it would certainly 
make things simpler if it was.  Perhaps I could have a few standard 
sizes...but the range between the smallest and the largest will be a 
factor of about (uncertain) 5000, with the smallest size dominating in 
frequency.  And cells will change in the number of their connections.
At least if I do things right.  But I really can't see how storage pools 
would help, as cells would not be freed in any predictable pattern, and 
not en-mass.

The shape of the graph is going to be dependent on the data, as what I'm 
doing is essentially measuring what comes near what, as a prediction of 
what parts of a pattern are missing.  I expect sub-graphs to develop 
automatically, but they can't be imposed from the start.

OTOH, limiting a combinatorial explosion is certainly one of the things 
that is going to require work.  But if I limit propagation too much, 
then the thing won't work.  So even if I get the basic design right, 
it's going to require a lot of ad hoc tuning.  I am currently planning, 
when I get things designed sufficiently, to tinker with activation 
levels and decay rates to control the combinatorial explosion...and also 
to keep signals from dying away too quickly.  That's probably going to 
require some "evolutionary programming" where similar programs with 
slightly different "gosh numbers" are run against each other, as I don't 
see any theoretical grounds for picking particular values.

Probably, when I get sufficient experience with Ada, I'll install the 
Boehm garbage collector.  Now that looks like asking for trouble.  Even 
GPS is giving me grief.

P.S.:  Is there any way to generate documentation for Ada, better than 
robodoc?  I don't count turning the program files into HTML to be 
documentation.  It doesn't add much over the bare files.  Something 
similar to DOxygen or Javadoc?  (Though DOxygen also tends to be too 
verbose.)



  reply	other threads:[~2013-01-02 19:02 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-31  0:16 asynchronous task communication Charles Hixson
2012-12-31  9:04 ` Simon Wright
2012-12-31 11:49   ` Simon Wright
2012-12-31 10:50 ` J-P. Rosen
2012-12-31 12:09 ` Georg Bauhaus
2012-12-31 18:52   ` Charles Hixson
2012-12-31 20:18     ` Shark8
2012-12-31 21:09     ` Niklas Holsti
2012-12-31 22:15       ` Randy Brukardt
2013-01-01  3:58         ` Charles Hixson
2013-01-01  4:48           ` tmoran
2013-01-01 17:59             ` Charles Hixson
2013-01-01  3:51       ` Charles Hixson
2013-01-01  9:59         ` Dmitry A. Kazakov
2013-01-01 10:38         ` Brian Drummond
2013-01-01 12:32         ` Jeffrey Carter
2013-01-01 18:21           ` Charles Hixson
2013-01-01 18:54             ` Robert A Duff
2013-01-02  7:36               ` Charles Hixson
2013-01-02  9:55                 ` Dmitry A. Kazakov
2013-01-02 19:02                   ` Charles Hixson [this message]
2013-01-02 20:35                     ` Dmitry A. Kazakov
2013-01-03  0:20                       ` Charles Hixson
2013-01-03  6:34                         ` Charles Hixson
2013-01-03  8:50                         ` Dmitry A. Kazakov
2013-01-03 19:01                           ` Charles Hixson
2013-01-03 10:01                         ` J-P. Rosen
2013-01-03 19:29                           ` Charles Hixson
2013-01-04  8:17                             ` J-P. Rosen
2013-01-05  4:31                               ` Charles Hixson
2013-01-09  8:34                                 ` Stephen Leake
2013-01-03 22:27                         ` Randy Brukardt
2013-01-05  5:18                           ` Charles Hixson
2013-01-05  8:48                             ` Niklas Holsti
2013-01-06 22:55                               ` Charles Hixson
2013-01-07  0:38                                 ` tmoran
2013-01-07  6:07                                 ` Shark8
2013-01-07 10:49                                 ` Brian Drummond
2013-01-07 18:27                                   ` Jeffrey Carter
2013-01-08 12:02                                     ` Brian Drummond
2013-01-08 17:12                                       ` Jeffrey Carter
2013-01-08 18:18                                         ` Simon Wright
2013-01-08 20:29                                           ` Dmitry A. Kazakov
2013-01-08 21:01                                           ` Jeffrey Carter
2013-01-08 21:14                                             ` Simon Wright
2013-01-08 22:11                                               ` Randy Brukardt
2013-01-08 22:52                                               ` Jeffrey Carter
2013-01-08 22:26                                         ` Brian Drummond
2013-01-08  2:41                             ` Randy Brukardt
2013-01-02 22:43         ` Niklas Holsti
2013-01-03  1:30           ` Charles Hixson
2013-01-03 12:11             ` Georg Bauhaus
2013-01-03 13:17               ` Dmitry A. Kazakov
2013-01-05 20:19               ` Charles Hixson
2013-01-07  4:01                 ` Shark8
2013-01-01 19:59     ` J-P. Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox