#๐Ÿ”’ ๐Ÿ”’ Input question

41 messages ยท Page 1 of 1 (latest)

feral orchidBOT
#

@fickle oyster

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

opal ruin
#

unclear what you're asking

#

I suspect you want to be able to do something sensible with various kinds of input

#

like you want the user to be able to say "the middle square", or "second column, second row", etc, and "understand" that

fickle oyster
#

yes like the player can write a lot of things to mean actually one

opal ruin
#

if that's the case, then I suggest: give up. It's too hard.

fickle oyster
#

fck

opal ruin
#

Instead give the user a short list of options from which to choose

fickle oyster
#

alr

#

but there is a possibility to do it isn't it?

opal ruin
#

of course it's possible

fickle oyster
#

I mean that's what I wanna know

opal ruin
#

it's just very hard

fickle oyster
#

ok ok

opal ruin
#

you'd probably need AI or something ๐Ÿ™‚

onyx hollow
#

you could change the input into a standardised version, for example you might implement the meanings of low and mid, so you could take any input, such as low Mid and first turn all letters into lower case -> low mid and then try to split on all the possible connecting characters, like ' ', ',', '-' etc. which should give you a list ['low', 'mid'], then you check whether your list looks like what you would expect (exactly 2 words, both being defined in your program) and if it doesn't, ask for a new input

opal ruin
#

at the very least, you'd need some fancy library that processes natural language.

fickle oyster
#

Ok I do understand

#

but I don't think it's that worth

#

I'm trying to build a tic tac toe but to do that it would take me so long am I right?

onyx hollow
#

you could also allow for multiple versions of the word "low" that you define yourself, but if you want the player to be able to do what offby1 said, i.e. any combination of commands that mean what you want them to mean, then you would need some sort of chatgpt wrapper that translates what the player says into words that you have defined, such as low and mid, to then proceed with the game

fickle oyster
#

Ok thank you so much

#

I think I could try the first idea

#

btw nice photo, I like that game

onyx hollow
#

basically, install openai api and prompt chatgpt with "I need to translate a user command into commands for my bot that plays tic tac toe. Please translate this <user input> into a combination of exactly two words and only use words 'low', 'mid', 'top' as your output so my program can understand you." Then take the output of chatgpt and feed it into your game

fickle oyster
#

what's an api?

onyx hollow
#

a way to communicate with a server via commands that the developers allowed you to use

fickle oyster
#

and how do I use that?

onyx hollow
#

it may be paid, I'm not sure what the pricing is there

fickle oyster
#

alr I'm not paying then

onyx hollow
#

chatgpt has a free version, I just dont know how exactly the api is priced, would have to look it up

fickle oyster
#

it's ok don't worry

#

thanks

#

do you know how to do to delete this conversation?

#

so others questions can be showed

feral orchidBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ Input question

feral orchidBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.