₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,064 members, 8,420,108 topics. Date: Thursday, 04 June 2026 at 11:31 AM

Toggle theme

Willace's Posts

Nairaland ForumWillace's ProfileWillace's Posts

1 2 3 4 5 (of 5 pages)

ProgrammingRe: I Want To Create An AI (artificial Intelligence) With Java by willace(op): 2:31pm On Mar 27, 2016
Celebrimbor:
Sorry to burst your bubble but I don't think you know what artificial intelligence is. Anyway Don't let me stop you. I am just being realistic and honest with you. Do your research and know what you are getting into before you do it. DONT ASSUME!!!
Thanks tho
ProgrammingRe: I Want To Create An AI (artificial Intelligence) With Java by willace(op): 2:23pm On Mar 27, 2016
Celebrimbor:
balance optimism with realism bro. if he had said that he was gonna build an operating system from scratch, I would have said sure go for it. But an AI is a whole new level. No negativity but this is a white elephant project...... for a single programmer.
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;

import java.awt.Color;

import java.awt.event.KeyListener;
import java.awt.event.KeyEvent;

import java.lang.Math;

public class ChatBot extends JFrame implements KeyListener{

JPanel p=new JPanel();
JTextArea dialog=new JTextArea(20,50);
JTextArea input=new JTextArea(1,50);
JScrollPane scroll=new JScrollPane(
dialog,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
);

String[][] chatBot={
//standard greetings
{"hi","hello","hola","ola","howdy"},
{"hi","hello","hey"},
//question greetings
{"how are you","how r you","how r u","how are u"},
{"good","doing well"},
//yes
{"yes"},
{"no","NO","NO!!!!!!!"},
//default
{"shut up","you're bad","noob","stop talking",
"(michael is unavailable, due to LOL)"}
};

public static void main(String[] args){
new ChatBot();
}

public ChatBot(){
super("Chat Bot"wink;
setSize(600,400);
setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);

dialog.setEditable(false);
input.addKeyListener(this);

p.add(scroll);
p.add(input);
p.setBackground(new Color(255,200,0));
add(p);

setVisible(true);
}

public void keyPressed(KeyEvent e){
if(e.getKeyCode()==KeyEvent.VK_ENTER){
input.setEditable(false);
//-----grab quote-----------
String quote=input.getText();
input.setText(""wink;
addText("-->You:\t"+quote);
quote.trim();
while(
quote.charAt(quote.length()-1)=='!' ||
quote.charAt(quote.length()-1)=='.' ||
quote.charAt(quote.length()-1)=='?'
){
quote=quote.substring(0,quote.length()-1);
}
quote.trim();
byte response=0;
/*
0:we're searching through chatBot[][] for matches
1:we didn't find anything
2:we did find something
*/
//-----check for matches----
int j=0;//which group we're checking
while(response==0){
if(inArray(quote.toLowerCase(),chatBot[j*2])){
response=2;
int r=(int)Math.floor(Math.random()*chatBot[(j*2)+1].length);
addText("\n-->Michael\t"+chatBot[(j*2)+1][r]);
}
j++;
if(j*2==chatBot.length-1 && response==0){
response=1;
}
}

//-----default--------------
if(response==1){
int r=(int)Math.floor(Math.random()*chatBot[chatBot.length-1].length);
addText("\n-->Michael\t"+chatBot[chatBot.length-1][r]);
}
addText("\n"wink;
}
}

public void keyReleased(KeyEvent e){
if(e.getKeyCode()==KeyEvent.VK_ENTER){
input.setEditable(true);
}
}

public void keyTyped(KeyEvent e){}

public void addText(String str){
dialog.setText(dialog.getText()+str);
}

public boolean inArray(String in,String[] str){
boolean match=false;
for(int i=0;i<str.length;i++){
if(str[i].equals(in)){
match=true;
}
}
return match;
}
}


Bros that is a source code for a chat bot i created . an AI follows the same process but a littlé bit advance. So it is possible my brother
ProgrammingRe: I Want To Create An AI (artificial Intelligence) With Java by willace(op): 1:59pm On Mar 27, 2016
Celebrimbor:
Well well...... let me be realistic... you can't do it.
Y do u say dat, someone already did it so y can't i.
It takes just belief and hardwork.
My friend dont limit ur mind 2 thinking small. Peace
ProgrammingI Want To Create An AI (artificial Intelligence) With Java by willace(op): 8:31am On Mar 27, 2016
Am currently learning java and i want to create an AI like a virtual Secretary.
Any ideas please
ProgrammingWhat Is The Best App For Programming On Android by willace(op): 8:27am On Mar 24, 2016
Please which app is best for programming on Android mostly java language
RomanceShe We Are Just Friends Yet She Is Always Jealous by willace(op): 8:50pm On Feb 09, 2016
Am in love with this girl and I already told her how I felt about her. She told me she is not interested that we are just friends. Yet anytime she sees me with another girl she is always VERY jealous.
Wat do I do?
ProgrammingWhich Is More Lucrative In Nigeria? by willace(op): 3:14am On Feb 08, 2016
Please which is more lucrative and has more job opportunities in nigeria:
App development or server/web development?
ProgrammingHow Do I Build A Career In Computer Programming by willace(op):
Am currently learning computer programing and web design. And am really in love with it. But it seems after learning I won't know what to do.
Please how can I build a lucrative career in computer programing
Your opinions will be appreciated
WebmastersPlease What Can I Blog About by willace(op): 8:38pm On Feb 06, 2016
Please am trying to start a blog but am confused about what to blog about
Please I need matured advice Thanks
ProgrammingWhat Should I Do In This Situation by willace(op): 9:42am On Feb 05, 2016
I and my younger sister recently got admitted into higher institution recently. But due 2 financial constraints I couldn't go. Now am planning on using this year to learn software development which has always been my dream. I intend 2 start with web development.
Wonderful ideas will be appreciated
CelebritiesRe: Why Is Skales Wearing One Wristwatch ? Is He The New Skibi?(pics) by willace(m): 11:00pm On Nov 21, 2015
So person no fit wear 1 wrist watch again 4 naija. buy 4 am Na cus una like dey talk about Wetin no dey add anything 2 una life. skales dey wear 1 wrist watch for 1yr. Hw much don enter ur pocket. nubbish
ProgrammingRe: Where Can I Find Good Programmers In Delta State by willace(op): 7:22am On Oct 27, 2015
project7:
I'm in Warri. Airport road. ASP.NET MVC C#, PHP Yii framework 2.0. Enterprise Application developer. I have a banking application running for 3 cooperatives.

I also know one Zend Framework 2 guru here in Warri. He has an enterprise hr app running for an Abuja based company.

And also know a VB.NET guru that developed and deployed a mud logging software for remote oil rig drilling monitoring. His office is at bright hope junction.

My point is we have good programmers here in Warri. Though we are few.
Bros can have ur contact. I would like u 2 tutor me
ProgrammingWhere Can I Find Good Programmers In Delta State by willace(op): 11:45am On Oct 26, 2015
Please Where Can I find Good programmers in delta state(Warri).
Cus it seems most of them are only in Lagos.
Nairaland GeneralWhat Are The Best Songs You Have Ever Listened To by willace(op): 10:25am On Oct 09, 2015
Mine are: Drake_lord Knows
Sam Smith_Stay With me
Avicii_the nights
One Direction_you and i
Drake_6pm In Dallas
west Life_you raised Me up
kierra Sheard_Indiscribable
2face_Spiritual Healing
Rick Ross_ten Jesus pieces
Wale_The Matrimony

Feel free to add yours
Nairaland GeneralWould You Do This If You Were Given 50M by willace(op): 12:14am On Oct 09, 2015
Would u give your beloved Mother A very Hot Slap For 50 Million Naira
CelebritiesWho Has The Best Vocals Among This Three Great Artistes(pics) by willace(op): 12:05am On Oct 09, 2015
Who has d best vocals among Sam Smith, Justin Timberlake and Bruno mars

RomanceWhy Do Nice And Faithful Guys Always Get Heart Broken by willace(op): 8:34pm On Oct 08, 2015
I have noticed Dat nice, sincere and Faithful Guys always Get Heart Broken. But D guys who are players and flirts always have good relationships.
I have been a victim of This. Maybe it's because am 2 nice dats y we don't last long in our relationships. But My friends who are players and Flirts always good lasting relationships. I have never double dated before when am dating am always very polite, sincere and Nice 2 these girls.I But I know Of guys who Triple date sef. They are always Rude. At times even beating Their girlfriends. But they always last.
Comments please
RomanceRe: How Do I Politely Return Her Gifts? by willace(m): 8:16pm On Oct 08, 2015
Bros u don enter arm robber motor. Just politely return d gifts and Tell her hw u feel
EventsRe: What Is The Father-in-law Peeping At? (photo) by willace(m): 8:12pm On Oct 08, 2015
bad guy. This Kin father fit Bleep he son wife o
ProgrammingRe: I Want To Start A Career In Software Development by willace(op): 10:24am On Oct 08, 2015
Am thinking of going to NIIT while also studying part time. I have also been taking online courses on software. Pls how good is dis?
ProgrammingI Want To Start A Career In Software Development by willace(op): 10:55pm On Oct 07, 2015
My dream is to become a Software engineer. I dream of it every day. Right now am no longer thinking of going 2 school full time because of the nature of unemployment in our dear country. I just intend 2 study part time dats is if I even want 2 go school. I just want 2 learn d necessary things Dat I need 2 create a successful software company Because software is D future. Pls guys I need ur advice
ProgrammingI Dont Know If I Should Create An Android App Using Already Existing Source Code by willace(op): 10:22am On Apr 06, 2015
i am currently creating an android app. I dont know if i should use already existing source codes for that particular app, then modify it and add my own innovations or if i should just create a new source code from scratch

please help
ProgrammingCreating Your Own Mobile Operating System by willace(op): 1:09am On Apr 06, 2015
I am currently Trying to create my own operating system and its not easy. Am trying to build it based on the linux kernel since its already an established kernel
The process involves knowledge of c++, ARM assembly. Am currently in the multi tasking phase .
Please any suggestion would help

1 2 3 4 5 (of 5 pages)