Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2014-09-17 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (57 votes), past polls