Ai Dreams Forum

Chatbots => General Chatbots and Software => Topic started by: Zero on July 19, 2019, 10:26:42 am

Title: chatbot as a function
Post by: Zero on July 19, 2019, 10:26:42 am
Here is a Fibonacci algorithm implemented in Erlang:

Code
fib(1) -> 1;
fib(2) -> 1;
fib(N) -> fib(N - 2) + fib(N - 1).

I was thinking, a chatbot is a bit like a huge function. The function parameter is the user's query, the returned value is the bot's reply. Maybe a programming language could be based on this idea, a chatbot as a function. A pattern on the left hand side, a template on the right hand side, sounds familiar. But in a functional language, functions call functions to do their work, so it would be like tiny chatbots asking things to other tiny chatbots in the thinkbot's mind. A thinking process.