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

Choosing a data structure for AI applications

by Ovid (Cardinal)
on Jul 16, 2002 at 01:46 UTC ( #181980=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    gives(ovid,money,irs).
    gives(ovid,book,grep).
    gives(ovid,book,kudra).
    
  2. or download this
    ?- gives(ovid,book,kudra).
    
  3. or download this
    ?- gives(ovid,book,irs).
    
  4. or download this
    ?- give(ovid,book,Who).
    Who=grep
    Who=kudra
    
  5. or download this
    {
      'gives' => {
    ...
          }
       }
    };
    
  6. or download this
    my @recipients = keys %{$facts{gives}{Ovid}{book}};
    
  7. or download this
    if ( exists $facts{gives}{Ovid}{book}{merlyn} ) { ... }
    
  8. or download this
    ?- gives(Who,book,_);
    Who=ovid
    Who=kudra
    yes
    
  9. or download this
    my @givers;
    foreach my $person ( keys %{$facts{gives}} ) {
        push @givers => $person if exists $facts{ gives }{ $person }{ book
    + };
    }
    
  10. or download this
    gives(ovid,book(learning_perl), merlyn).
    
  11. or download this
    ?- gives(ovid, book(Title), merlyn).
    Title=learning_perl
    
  12. or download this
    gives(kudra,book(learning_perl),merlyn).
    
  13. or download this
    location( kitchen_drawer, [ knife, fork, kitten ] ).
    
  14. or download this
    positive(Number) :-
        Number > 0.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://181980]
Approved by epoptai
Front-paged by FoxtrotUniform
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-07-04 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls