Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Just another Perl shrine
 
PerlMonks  

Re: A simple game AI that learns

by Fastolfe (Vicar)
on Jan 13, 2001 at 23:32 UTC ( [id://51662]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to A simple game AI that learns

Interesting stuff.. Have you considered using Storable for saving state information?

Replies are listed 'Best First'.
Re: Re: A simple game AI that learns
by Falkkin (Chaplain) on Jan 14, 2001 at 02:58 UTC
    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.
      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://51662]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.