Author Topic: Wishing - Something we have now that we didnt.  (Read 377 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Wishing - Something we have now that we didnt.
« on: August 03, 2016, 01:36:58 pm »


               

During my scrape of the Bioware forums, I was reminiscing on some of the old Scripting posts from yonks back.


One was around Wishing spells.


 


Recently myself and some colleagues at work won a competition around Language Understanding and AI.


(Our company does 'Hackathons' where we have 36 hours to develop something from scratch.)


Similar to Siri for the iphone - the ability to use human language to request something from the program.


 


https://www.microsof...nt-service-luis


 


or the one we used


https://api.ai/


 


 


These all use a restful interface - which can be integrated into via .Net for windows users, or Java for Linux users of nwnx


The idea being that you could in theory, make an NPC that listens to what you say in front of him, he then takes your statement, sends it to the web services listed above (one of them), the web service then interprets what you wanted from the statement.


 


Eg:


Intent - Give an amount of gold


Utterance (as LUIS calls it) :  I wish for a million gold pieces


 


In Luis, it would label the 'million' as a numeric expression and then use the rest of the statement in tandem with some machine learning, to return to the caller, the possible things being requested by the phrase.


 


Example response would look like


Using this data, you could then route the arguments to the desired internal scripting function.Eg: AddItemToInventory() or AddGold


{
"query": "I wish for a million gold pieces",
"intents": [
{
"intent": "GiveGold",
"score": 0.919818342
},
{
"intent": "None",
"score": 0.136909246
},
{
"intent": "TakeGold",
"score": 0.007304534
}
],
"entities": [
{
"entity": "amount",
"type": "Currency::GoldPieces",
"startIndex": 14,
"endIndex": 21,
"score": 0.861795356
}
}
]
}

 

 


 



               
               

               
            

Legacy_kamal_

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
Wishing - Something we have now that we didnt.
« Reply #1 on: August 03, 2016, 04:52:05 pm »


               

One amusing thing about that would be that when the script didn't produce the expected result, it's just the DM carefully interpreting your wish phrasing to twist things. '<img'>