0

Say I have a libgdx tic tac toe game and I want to make an AI in python to play against the user. Is there any way to run the AI from a java class ? If yes will it work for android ? Thanks for spending your time.

0

1 Answer 1

0

For executing Python code from Java, please see Calling Python in Java?

For executing Python from an Android project written in Java, please check Execute python script from android App in Java

Dependent on how complex your (already written?) AI is, it is maybe easier to port it to java.

Sign up to request clarification or add additional context in comments.

1 Comment

I am trying to import org.python.util.PythonInterpreter. I can do it in a normal java project but it doesnt work in a libgdx project for some reason. The intellisense works but when I run it, it does not compile. I am using intellij

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.