我在Mac和Linux上使用秒差,直径和温度单位做我的家庭作业或我的学校工作班/作业介绍,关于未知区域行星的问题。我将FuzzyVariable应用于行星名称和单位。
我添加了(import nrc.fuzzy.*)
。
;Distância do Coruscant
(defglobal ?*gVarDistanciaDeCoruscant* = (new nrc.fuzzy.FuzzyVariable "distanciaDeCoruscant" 0.0 30000.0 "parsecs"))
;Temperatura dos Planetas
(defglobal ?*gVarTemperatura* = (new nrc.fuzzy.FuzzyVariable "temperatura" 0 8000 "K"))
;Planetas Vizinhos
(defglobal ?*gVarPlanetasVizinhos* = (new nrc.fuzzy.FuzzyVariable "distanciaPlanetasVizinhos" 0.0 400000.0 "d"))
;Raio em termos de unidades coruscantenses
(defglobal ?*gVarTamanho* = (new nrc.fuzzy.FuzzyVariable "tamanho" 0 500 "EU"))
;Quando o planeta foi descoberto
(defglobal ?*gVarDescobertaTempo* = (new nrc.fuzzy.FuzzyVariable "descoberta" 50000BBY 400ABY))
(call nrc.fuzzy.FuzzyValue setMatchThreshold 0.1)
终端,杰斯给出了错误:
Jess reported an error in routine new
while executing (new nrc.fuzzy.FuzzyVariable "distanciaDeCoruscant" 0.0 30000.0 "parsec")
while executing definition for defglobal ?*gVarDistanciaDeCoruscant*
while executing (batch "/Users/UNISAL/Documents/AI/StarWars.clp").
Message: Class nrc.fuzzy.FuzzyVariable not found.
Program text: ( defglobal ?*gVarDistanciaDeCoruscant* = ( new nrc.fuzzy.FuzzyVariable "distanciaDeCoruscant" 0.0 30000.0 "parsec" ) ) at line 26 in file /Users/UNISAL/Documents/AI/StarWars.clp.
Nested exception is:
nrc.fuzzy.FuzzyVariable
我认为Mac和Linux没有Jess这个软件包。是否可以添加与Mac和Linux兼容的错过的包?
我需要将我的工作班/作业演示文稿提供给我的老师以获得好成绩。
您可以查看整个文档:https://gist.github.com/gusbemacbe/8ad836256edcfb5edbffe206cad6c9e8
答案 0 :(得分:0)
基础Jess发行版不包含FuzzyJ;你必须单独安装它,将它包含在类路径中,然后使用FuzzyMain而不是标准的Jess.Main启动。你的导师应该告诉你这一切。如果您没有FuzzyJ,可以从Jess网站的“用户贡献”页面下载:http://www.jessrules.com/contributions/。