I use SWI-Prolog
I have lists like this
[sunny,hot,high,weak,no]
and
[outlook,temperature,humidity,wind,play_tennis]
I want to ma开发者_JAVA百科ke a predicate like
run(no,  [outlook=sunny,    temp=hot,  humidity=high,   wind=weak  ]).
Is it possible?
Yes, but you're going to have to implement the appropriate machine learning algorithm (your example looks identical to the ones found in Mitchell's machine learning book, is this a homework assignment?).
Note that you can use the =.. operator to turn a list into a predicate, which might help you if I've misunderstood your original question. In other words, A=..[a,b,c] binds a(b,c) to A
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论