Basic AI

  • 4 Replies
  • 2766 Views
*

slashzed

  • Roomba
  • *
  • 1
Basic AI
« on: April 07, 2016, 08:11:53 am »
Hi there,
I'm new to this forum and new to create an AI Software.
Looking for a head start to learn the basics of AI and start from a simple program.
I work in vb.net and im not sure if i have to use another language to create an AI Software or i can continue with what I know.
Just need a guide line to how and where to start...

Thanks in advance....

*

Mr.Fox

  • Bumblebee
  • **
  • 35
    • Dreamwalker Software
Re: Basic AI
« Reply #1 on: April 07, 2016, 09:59:04 am »
Well it just depends on what you want to make, I recently made a program in C# which allows you to create and teach your own robot, see: http://dream-walker.weebly.com/ai.html

There are many different types of A.I or what could be considered intelligent (note: on that page I also wrote a white paper you might find interesting). A simple approach would possibly be to make a game where the player is against the A.I, that might be a good start.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Basic AI
« Reply #2 on: April 07, 2016, 08:31:26 pm »
Welcome aboard.

You didn't specify a particular area of interest as A.I. can and does encompass a rather wide expanse of study.

If you decide on a topic you'd like to explore further, then post your selection here (on the forum...not necessarily in this section), and see what happens.

In the mean time, you can always wade through this A.I. site, that also serves to provide our resident, Tyler, a lot of material for posting.  www.aitopics.org

Best of luck!
In the world of AI, it's the thought that counts!

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Basic AI
« Reply #3 on: April 07, 2016, 09:09:13 pm »
Here is a vb.net chatbot source code and screen shot found on Microsoft's website:

Citation: https://social.msdn.microsoft.com/Forums/vstudio/en-US/7290b676-6381-4b75-9335-4f599eb56132/need-help-creating-a-chat-bot-in-visual-basic-2010-or-visual-web-developer-express?forum=vbgeneral

This sample source code may have been posted anonymously, or is otherwise unclear as to who the author is.  However, all credit goes to whoever that original author is.  So, for reference in our discussion I will quote the vb.net source code listing:

Quote
Code
Option Strict On
Public Class Form1
    WithEvents txtChatInput As New TextBox
    WithEvents btnSendInput As New Button
    WithEvents txtOutput As New TextBox
    Dim ChatItems As New List(Of ChatItem)
    Dim CantAnswer As New List(Of String)
    Dim CantRespond As New List(Of String)
    Dim MonospacedFont As New Font("consolas", 12)
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Width = 1000
        Me.Height = 500
        txtChatInput.Size = New Size(New Point(191, 20))
        txtChatInput.Location = New Point(13, 29)
        btnSendInput.Size = New Size(New Point(75, 20))
        btnSendInput.Location = New Point(210, 29)
        btnSendInput.Text = "Send"
        txtOutput.Font = MonospacedFont
        txtOutput.Left = 0
        txtOutput.Multiline = True
        txtOutput.WordWrap = False
        txtOutput.ScrollBars = ScrollBars.Both
        txtOutput.Top = txtChatInput.Top + txtChatInput.Height
        txtOutput.Height = Me.ClientRectangle.Height - txtOutput.Top
        txtOutput.Width = Me.ClientRectangle.Width
        ' txtOutput.Dock = DockStyle.Bottom
        Me.Controls.Add(txtChatInput)
        Me.Controls.Add(btnSendInput)
        Me.Controls.Add(txtOutput)
        Dim C1prompts As New List(Of String)
        Dim C1Responses As New List(Of String)
        C1prompts.Add("How are you doing today?")
        C1prompts.Add("How are you doing?")
        C1prompts.Add("How are you?")
        C1prompts.Add("Are you doing well?")
        C1Responses.Add("I'm doing great! Thanks for asking!")
        C1Responses.Add("Not too shabby...")
        C1Responses.Add("I can't compain!")
        Dim ChatItem1 As New ChatItem(C1prompts, C1Responses)
        ChatItems.Add(ChatItem1)
        Dim C2prompts As New List(Of String)
        Dim C2Responses As New List(Of String)
        C2prompts.Add("Yes")
        C2Responses.Add("ok good...")
        C2Responses.Add("good to hear that...")
        Dim ChatItem2 As New ChatItem(C2prompts, C2Responses)
        ChatItems.Add(ChatItem2)
        CantAnswer.Add("I refuse to answer that")
        CantAnswer.Add("I don't even know why you would ask that...")
        CantAnswer.Add("I don't know everything!")
        CantAnswer.Add("What do I look like, an encyclopedia?")
        CantAnswer.Add("Can we talk about something else?")

        CantRespond.Add("Is that so?")
        CantRespond.Add("I did not know that...")
        CantRespond.Add("Why are you telling me this?")
        CantRespond.Add("Absolutly amazing...")
        CantRespond.Add("Does that even make sense?")
    End Sub
    Sub btnClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnSendInput.Click
        Randomize()
        Dim Random As New Random
        Dim Index As Integer

        Dim Prompt As String = txtChatInput.Text
        Dim PromptFound As Boolean = False
        For Each ChatItem As ChatItem In ChatItems
            If ChatItem.PromptFound(Prompt, False) Then
                PromptFound = True
                Select Case ChatItem.PromptCount < 3
                    Case True
                        Index = Random.Next(0, ChatItem.Responses.Count - 1)
                        txtOutput.Text = txtOutput.Text & vbCrLf & "You:         " & Prompt & vbCrLf & "Computer:    " & ChatItem.Responses(Index) & vbCrLf
                        ChatItem.PromptCount = ChatItem.PromptCount + 1
                    Case Else
                        Select Case ChatItem.PromptCount < 4
                            Case True
                                Select Case InStr(Prompt, "?") > 0
                                    Case True
                                        txtOutput.Text = txtOutput.Text & vbCrLf & "You:         " & Prompt & vbCrLf & "Computer:    " & "You have already asked me that " & ChatItem.PromptCount & " times... You know the answer..." & vbCrLf
                                    Case Else
                                        txtOutput.Text = txtOutput.Text & vbCrLf & "You:         " & Prompt & vbCrLf & "Computer:    " & "You have already said that " & ChatItem.PromptCount & " times... I am going to ignore you..." & vbCrLf
                                End Select
                                ChatItem.PromptCount = ChatItem.PromptCount + 1
                                Exit For
                            Case Else
                                txtOutput.Text = txtOutput.Text & vbCrLf & "You:         " & Prompt & vbCrLf & "Computer:    " & "dude say something new..." & vbCrLf
                                ChatItem.PromptCount = ChatItem.PromptCount + 1
                                Exit For
                        End Select
                End Select
            Else
                ChatItem.PromptCount = 0
            End If
        Next
        If Not PromptFound Then
            If Not InStr(Prompt, "?") > 0 Then
                Index = Random.Next(0, CantRespond.Count - 1)
                txtOutput.Text = txtOutput.Text & vbCrLf & "You:    " & Prompt & vbCrLf & "Computer:    " & CantRespond(Index) & vbCrLf
            Else
                Index = Random.Next(0, CantAnswer.Count - 1)
                txtOutput.Text = txtOutput.Text & vbCrLf & "You:    " & Prompt & vbCrLf & "Computer:    " & CantAnswer(Index) & vbCrLf
            End If
        End If
    End Sub
End Class
Class ChatItem
    Public Prompts As New List(Of String)
    Public Responses As List(Of String)
    Public PromptCount As Integer
    Sub New(ByVal Prompts As List(Of String), ByVal Responses As List(Of String))
        Me.Prompts = Prompts
        Me.Responses = Responses
        Me.PromptCount = 0
    End Sub
    Function PromptFound(ByVal Prompt As String, ByVal CaseSensitive As Boolean) As Boolean
        Select Case CaseSensitive
            Case True
                If Not Prompts.IndexOf(Prompt) = -1 Then Return True
                Return False
            Case Else
                Dim Exists As Boolean = False
                For Each S As String In Prompts
                    If LCase(S) = LCase(Prompt) Then
                        Exists = True
                    End If
                Next
                Return Exists
        End Select
    End Function
End Class

Please visit the Microsoft.com link above for more information.  The purpose of posting this source code is for discussion purposes and to help you find it on the Microsoft.com forum thread.  If anyone can figure out the original  author's name, please add it to this discussion.

EDIT:

Looks like the author is...

Paul Ishak
Dirigo Systems Inc

_________________________________________________________________
« Last Edit: April 08, 2016, 03:19:16 am by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Basic AI
« Reply #4 on: April 07, 2016, 09:28:21 pm »
Hi slashzed :)

You would probably want to take a look at AIML (artificial intelligence markup language). It is used to successfully create chatbots.

 


LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

429 Guests, 0 Users

Most Online Today: 447. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles