Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Choosing a data structure for AI applications

by talexb (Canon)
on Jul 16, 2002 at 13:25 UTC ( #182068=note: print w/replies, xml ) Need Help??

in reply to Choosing a data structure for AI applications

Very interesting.

So far it looks like there are two possibilities -- store your 'database' in a database, or store it in some kind of HoH & meta-data store. You have the additional complication of 'duplication', re: the book you gave merlyn is later given to kudra.

I'm not that familiar with Prolog but it seems that you would need to specify that the book has the attribute 'real -- cannot be given to more than one person at once' (which reminds me of a software company's license -- but I digress) as opposed to 'imaginary -- can be given to as many people as you like' (directions, blessing, a kiss).

Getting back to the database/data & metadata discussion, I'd probably lean towards the second choice simply because you could model it with OO to enforce a certain way of storing the data .. among other things, this would allow you to enforce the 'can only be given once' rule mentioned in the previous paragraph.

Doing this in some kind of matrix arrangement also seems intuitively obvious .. your example suggests you'd want to check a three-dimensional matrix or take a two dimensional slice of a 3D matrix. Naturally in the implementation you'd want a few more dimensions than that.

Finally, as far as persistence is concerned, it should be possible to dump the 'workspace' (to use an APL term) then be able to load it back up when the next session starts. I haven't used Data::Dumper but it sounds like it would be right for the job.

--t. alex

"Mud, mud, glorious mud. Nothing quite like it for cooling the blood!"
--Michael Flanders and Donald Swann

  • Comment on Re: Choosing a data structure for AI applications

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://182068]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-10-18 12:13 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (244 votes). Check out past polls.