Skip to content
← Back to Community
How can i add an ai to my bots?
Profile icon
Atomic-Gamming

I made a program that floods a Kahoot.it server with bot but I need to add an ai to it but I don't know how to make one. can you guys make a ai for me, please?

Answered by SixBeeps [earned 5 cycles]
View Answer
Voters
Profile icon
IsaiahStewart3
Profile icon
AtticusKuhn
Profile icon
Atomic-Gamming
Comments
hotnewtop
Profile icon
SixBeeps

webbot has a click() function. Look at the structure of a Kahoot game to see if you can get some kind of identifier on each of the buttons.

Profile icon
Atomic-Gamming

@niorg2606 well it would just need to click one of the buttons randomly

Profile icon
SixBeeps

@JamesGordon1 Then do that

Profile icon
Atomic-Gamming

@niorg2606 how would I get it to do detect when it goes into a game?

Profile icon
SixBeeps

@JamesGordon1 Just delay the script until it finds an element that is in the play mode only.

Profile icon
Atomic-Gamming

@niorg2606 sorry if i am bugging you but how would i do that (i am new to webbot)

Profile icon
SixBeeps

@JamesGordon1 You already know how to do that, don't you?

input_elements = driver.find_elements(xpath='//input')
Profile icon
Atomic-Gamming

@niorg2606 yes but how would i detect when the url changes to this https://kahoot.it/v2/gameblock

Profile icon
Atomic-Gamming

@niorg2606 would I do it like this?

while True: url = driver.get_current_url() if url == "https://kahoot.it/v2/gameblock": print ("yes") break
Profile icon
SixBeeps

@JamesGordon1 That looks about right.

Profile icon
Atomic-Gamming

@niorg2606 i tested it it works

Profile icon
SixBeeps

@JamesGordon1 Coolio.
(make sure to mark my comment as the answer if I helped)

Profile icon
Atomic-Gamming

@niorg2606 ok but how can i make this work?

input_elements = driver.find_elements(xpath='//input') pick = random.randint (1,4) print (pick) clickloop = 0 while True: if clickloop == pick: driver.type(driver.Key.ENTER,into=input_elements[0].text) else: clickloop = clickloop + 1 driver.type(driver.Key.TAB,into=input_elements[0].text)
Profile icon
Atomic-Gamming
Profile icon
CalebCarlson

You do NOT need an ai for this. A couple simple logical statements should be good enough.
If you want to add an ai you need to understand math very well.
here is an example of a function that is used in many ai applications.
f(x)=1/(1+e^-x)
this function is called a logistical curve, it is used to 'squash' neuron input values.
the above example was just barely touching the surface of ai.


so while you could probably figure out how to get a basic ai going, I don't think that an ai is what you need.

Profile icon
Atomic-Gamming

@CalebCarlson i added one (it just randomly picks an answer)

Profile icon
CalebCarlson

@JamesGordon1


not the kind of ai I was thinking of....
but yeah, that would work lol XD

Profile icon
Atomic-Gamming

@CalebCarlson ya i only did it becaue it is imposable to read the question

Profile icon
CalebCarlson

@JamesGordon1
Actually.... if you wanted it to read the question that would be the perfect application for an ai.
An example of that would be mail. (physical mail where you put it in your mailbox.) People are using ai to read addresses and such.