Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In recent times, Artificial Intelligence has become a bigger demand. A simple an

ID: 3605448 • Letter: I

Question

In recent times, Artificial Intelligence has become a bigger demand. A simple and fun tool related to AI is a chatbot. There are actual competitions, called the Loebner Prize, based on who can create the most “human-like” chatbots. The key to creating a good chat bot lies in the way it talks and responds in conversation.

Write a program that will behave similarly to the chatbot you created in Lab 5, except the chatbot’s responses will no longer be random – they will be “smart” and somewhat more realistic. For example, if the user says something with the word “father” or “mother”, the chatbot could respond with “Oh! What about your parents?”. Or if the user says something about their brother or sister, it could say “I have a sister. Her name is Siri.” Perhaps the user hits enter without typing anything at all; the chatbot could ask “I’m sorry, I didn’t hear anything. What did you say?”

Add these Advanced Responses:

If the user writes “I want apples.” The responses should be “Why do you want apples?”

First, find whether or not the string the user entered contains “want”. If so, find the position of “want” and create a substring using that position to get the word after it (“apples” in this case) – have this word saved in a new string.

Next, concatenate and use String methods to make a new String that saves the chatbot’s response, similar to the one shown above: “Why do you want apples?”, where “apples” is whatever word the user typed in originally.

Another example: The user types in “I want potatoes.” So the chatbot’s response is “Why do you want potatoes?”

If the user writes “I want to buy a gaming computer” the response should be “Would you be happy if you had a gaming computer?” Use the same technique as the steps above describe, but instead of having to check for “want”, here you will check for “want to buy”.

Notice that since “want to buy” still contains “want” (from Step 1), you will have to be more careful so that multiple responses don’t appear. How would you make it so that only one chatbot response is shown, rather than both? Think about the if else statement and how it is structured with levels – if the first condition comes out to be true, the rest are ignored.

If the user enters “I like to bake cheesecakes.” The response should be “Why do you like to bake cheesecakes?” Look at the pattern and think about the steps you took in the previous chatbot responses. What substring would you check for, and what substring would you save to create this response?

Make a method called “getRespone()” that will determine what string the chatbot will use to respond to the user. The method body will be the code you wrote for the steps above. In addition to this, what will be the required parameter(s) and return type?

What is the “divide and conquer

strategy, as discussed in the textbook?

At the end of this method, include a pool of 5 responses that can be

randomly chosen if none of the other criteria match what the user has entered (i.e. if the chatbot cannot use any of the responses you created). For example, one of these could be “I don’t understand what you’re saying. Can you reword that?”

Make sure to include proper input and output back in the main method, as well as looping, so that the user can try to hold a conversation with your new chatbot.

Once complete, try to add at least three more Advanced Responses of your own. Put each one of these into their own method, and have those methods called by the getResponse() method when your

Explanation / Answer

Divide and Conquer

Description

Cause confusion in the enemy camp. Get them at each other's throats so they pay less attention to fighting you. A way to do this is by paying more attention to one person or one group in a broad field of others, or by sowing false information.

Initially put more effort into persuading the more sympathetic person. Then when you have convinced them of your argument, work together with them to persuade others. You may also have to put in effort to keep them apart, particularly if those who are strongly opposing you are also working on the sympathizers.

When they are arguing amongst themselves, propose solutions that the key people will accept and which will support their internal negotiations.

Example

A side member of a negotiating team spends time with some of the younger members of the other side whilst the main negotiations are going on elsewhere. In their discussions, they touch on how the ideas from these bright young people are being ignored by their superiors.

A negotiator and a colleague 'privately' talk about how one person on the other side is more successful than another. They know that they are being overheard and their talk is designed for the listener.

A negotiator hints in an aside to the other person how one solution will allow them to win some of their internal battles.

Discussion

It is common that negotiating team members have different views and that some are more hard-line while others are more moderate. The members will have different motivations, including their desires to be on good terms with you and to conclude the negotiation sooner or later. If you can understand these (watch body language, listen to words, etc) then you can test your assessment in breaks and other times where you may talk privately with them.

If you can get the other side to take their eye off the substantive ball then you can consequently gain control of the proceedings. When others disagree with one another, then one may well take your side in order to win points against their internal opponents.

When there are two other people, such as a married couple, then views may be quite different. Watch for the dominant partner then direct innocent questions at the quieter one to test their views and also to see how the dominant partner reacts.

In team negotiations, people with non-direct roles such as note-takers may be approached to test their roles and their ability to influence others.

This, of course, is a hazardous strategy which can backfire if they discover what you are doing. To succeed, it must be executed with great care and finesse.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote