简体   繁体   English

CS 术语,用于强制和可选条件元组的规则匹配算法

[英]CS term for rule matching algorithms on tuples of mandatory and optional conditions

I'm trying to research literature for algorithms to solve a particular problem, but I don't think I quite know the right search term to describe what I'm looking for.我正在尝试研究用于解决特定问题的算法的文献,但我认为我不太清楚描述我正在寻找的内容的正确搜索词。

The goal is to have a queryable rules database, where each rule is specified as tuple conditions — some mandatory, some optional.目标是拥有一个可查询的规则数据库,其中每个规则都被指定为元组条件——一些是强制性的,一些是可选的。 A query into the system consists of a tuple of facts about the world, and returns a list of all the rules whose mandatory conditions matched the facts in the query.对系统的查询由有关世界的事实元组组成,并返回其强制条件与查询中的事实匹配的所有规则的列表。 Each rule is scored by the number×weight of optional conditions matched and the list is sorted thereby.每条规则按照匹配的可选条件的个数×权重进行评分,从而对列表进行排序。

So for an example, if I were using this to write a roommate-matching service, the rules would be something like所以举个例子,如果我用它来写一个室友匹配服务,规则会是这样的

alice : { mandatory : { nightowl = no, smoker = no, pets < 2 }, 
          optional : { pets = 0 } }
bob :   { mandatory : { nightowl = yes, pets = 0 }, 
          optional : {smoker = no} }
charlie : { mandatory : { musician = no }, 
            optional : {nightowl = yes, pets < 2 } }

and the query would be查询将是

( nightowl = no, pets = 1, smoker = no, musician = no )

returning返回

( charlie : 1/1 mandatory matched, 1/2 optional matched,
  alice   : 3/3 mandatory matched, 0/1 optional matched )

I know this is a problem that must have been solved many times in computer science already, but I don't know what keywords to search for.我知道这是一个必须在计算机科学中已经解决过很多次的问题,但我不知道要搜索什么关键字。 It's not a distance function , because some conditions are discrete true/false rejectors whereas others are optional or have linear scores.这不是距离 function ,因为某些条件是离散的真/假拒绝器,而其他条件是可选的或具有线性分数。 It's not pattern matching or fuzzy matching , because those seem to refer mostly to strings and graphs.这不是模式匹配模糊匹配,因为它们似乎主要指的是字符串和图形。 It's not a production system or rules engine like the Rete algorithm , because it doesn't draw IF-THEN inferences from rules, nor does it remember facts from one call to the next.它不是像Rete 算法那样的生产系统规则引擎,因为它不会从规则中得出 IF-THEN 推论,也不会记住从一个调用到下一个调用的事实。

What is it called?叫什么?

I only need research or descriptions of algorithms, not actual implementations.我只需要对算法的研究或描述,而不是实际的实现。 Our application has such severe realtime and memory constraints that we'll need to build an implementation of our own anyway, but I'd like to know what else has been done in the space before I start inventing code.我们的应用程序具有如此严格的实时性和 memory 约束,无论如何我们都需要构建自己的实现,但在我开始发明代码之前,我想知道该领域还做了什么。 An ACM paper that I could chase citations from would be great, too.一篇我可以从中获得引用的 ACM 论文也很棒。

The term I'd say most accurately describes the type of problem you're talking about is a constraint satisfaction problem .我要说的最准确地描述您正在谈论的问题类型的术语是约束满足问题

More specifically, you're in the realm of weighted constraint satisfaction.更具体地说,您处于加权约束满足的 realm 中。

Constraint programming is the usual term for a set of tools and languages that are designed specifically for solving these types of problems.约束编程是专门为解决这些类型的问题而设计的一组工具和语言的常用术语。

Matching the mandatory conditions is range searching , specifically orthogonal range searching.匹配强制条件是范围搜索,特别是正交范围搜索。 The relevant literature belongs to computational geometry.相关文献属于计算几何。 Ranking by optional conditions is a sorting operation.按可选条件排序是一种排序操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM