Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

50
LINES

< > BotCompany Repo | #1002745 // C is a Language

Document

// Learning

[
  if  [User < says < C < is < a < Language]
  and [i < don't < know < C]
  memorize [User < said < C < is < a < Language]
  say [
        [ok < C < is < a < Language]
        [i < will < remember < that]
      ]
]

// Querying

[
  if  [User < says < what < is < X]
  and [* < said < X < is < a < Language]
  say [X < is < a < Language]
]

[
  if  [User < says < is < C < a < Language]
  and [* < said < C < is < a < Language]
  say [yes]
]

[ // fallback
  if  [User < says < is < C < a < Language]
  say [i < don't < know]
]

// Verifying

[
  if  [User < says < C < is < a < A]
  and [* < said < C < is < a < A]
  say [yes < i < know]
]

// Adding another one

[
  if  [User < says < C < is < a < B]
  and [* < said < C < is < a < A]
  memorize [User < said < C < is < a < B]
  say [
        [oh < i < thought < C < was < a < A]
        [i < will < remember < that < it [= C] < is < also < a < B]
      ]
]

Author comment

Began life as a copy of #1002732

download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002745
Snippet name: C is a Language
Eternal ID of this version: #1002745/1
Text MD5: 1d78116e2c7f7f4d87c5fd0d0c960897
Author: stefan
Category: snl logic
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-20 04:59:37
Source code size: 977 bytes / 50 lines
Pitched / IR pitched: No / No
Views / Downloads: 616 / 637
Referenced in: #1002746 - SNL Logic Engine 3 (C is a Language)
#1002751 - SNL Logic Engine 4, multiple returns, as class
#1002753 - X is Y
#1002754 - Test case for logic engines (#1002745)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)