Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: A simple game AI that learns

by Falkkin (Chaplain)
on Jan 14, 2001 at 07:58 UTC ( [id://51687]=note: print w/replies, xml ) Need Help??


in reply to Re: A simple game AI that learns
in thread A simple game AI that learns

I'm currently using Data::Dumper to simply write the contents of the memory to disk and to load them back in again when the program is restarted -- is there any specific reason I should be using Storable instead? I read the pod for it and it looks like it basically does the same thing I'm doing with Data::Dumper.

Replies are listed 'Best First'.
Re: Re: Re: A simple game AI that learns
by Fastolfe (Vicar) on Jan 14, 2001 at 08:23 UTC
    Data::Dumper actually expands the data structure into human- and perl-readable form, which requires re-parsing it when you want to use it again. Storable works more like serialization in Java, in that a portable binary representation of the Perl variable is made, preserving things like blessed references and the like. I suspect Storable is going to be a little more efficient if all you want to do is store and retrieve the Perl structure.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://51687]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-20 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found