Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Choosing a data structure for AI applications

by Ovid (Cardinal)
on Jul 16, 2002 at 01:46 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found