We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Basic AI Championship
(translated by Google translator)

Hi all.  Shy
Today I tried playing football with a robot that detects the position of the ball on the field using vision.
On my tablet, the "LDImage.FindImageInImage()" function clearly does not have time to find even one white pixel in the required area of the graphics window.
If the game loop becomes shorter than 100 milliseconds, then the robot loses sight of the ball.

Since, probably, the "LDImage.FindImageInImage()" function searches for an image in an image by checking each pixel, then I hope to achieve my goal using the "LDGraphicsWindow.GetPixel()" function.

The ball has a diameter of 20 pixels.
So I think if I search for a white pixel of the ball on the playing field with a step of 10 pixels horizontally and vertically, the program will have to check 100 times fewer pixels.  Undecided
I hope this will allow us to find the ball quickly enough.

( if anyone is interested, I can post the current version with the big-eyed robot so you can try your ideas or find my mistakes )
Reply
(translated by Google translator)

An incredibly fun process.  Rolleyes

For example, making such a game in C# would not be interesting at all.
But here in Small Basic, you'll need all your ingenuity to make the game work well even on a slow tablet.  Cool

I've used everything I've learned about Small Basic so far.
It seems to me that I have already used all the technical capabilities to achieve a sufficient speed of the game. But, I still lack a little speed.

At first I thought it was already a dead end.
But then a new idea comes to mind again - and the feeling of enthusiasm returns.
I thought that in case of mechanical resources running out, using AI elements could help.
In conditions where the hardware does not have time to calculate everything necessary, the program can try to "look into the future" and predict where the ball WILL BE at the moment when the hardware finishes the calculations (!).

Now I have the current version of the game, in which I think I have used all the possibilities of technique.
If anyone is interested, I can improve the code formatting and post it on my OneDrive.
And now I will begin to add to the program the ability to predict the future...
Reply
(translated by Google translator)

Dear Small Basic fans,
I just put the latest version of the game "Retro Football" into my OneDrive. ( Retro Football v0_0401 with AI.sb )

This version is notable because I used a ball search by image and parallel operation of two computation threads (asynchronous subroutine call).
These were unexplored topics for me.  Shy

In addition, this version of the game gives the opportunity to organize AI Football matches BETWEEN TWO ROBOTS.
Now, the right team of football players is controlled by a person, moving the mouse across the graphic window.
The left team is controlled by a robot that determines the position of the ball on the field using "vision".
(on my slow tablet, the robot takes up to 4 game cycles to make its decision)

But (!)...
Thanks to the LitDev extension, not only a person can move the cursor around the graphic window.
Therefore, every fan of cyber SB sports can write an AUTONOMOUS SB program, which will also "see" the ball on the field, using "vision" and will be able to control the right team of football players, moving the cursor on the screen.
Thus, two "sighted" robots can compete with each other.

(what do you think about our Small Basic now? Wink  )
Reply
Is it ethical for AI programs to compete against human athletes in sports? As AI continues to advance, should we reconsider the definition of competition, or does this undermine the spirit of sportsmanship? What implications does this have for the future of both AI development and athletic integrity?",
"refusal
Reply
(Yesterday, 04:39 PM)ThorstenFuh Wrote: Is it ethical for AI programs to compete against human athletes in sports? As AI continues to advance, should we reconsider the definition of competition, or does this undermine the spirit of sportsmanship? What implications does this have for the future of both AI development and athletic integrity?",
        "refusal

(translated by Google translator)

Hello.  Shy
You are absolutely right.
That's why the Robot Championship has been announced here.  Cool
The game "AI Snake" and the game "Retro Football" were created here specifically for competitions between robots.
Anyone can create THEIR OWN robot.
Then, a person can download the code of another developer's robot and hold a competition between these robots directly on his computer.
After these competitions, the developer can upgrade his robot to make his robot the BEST.
When the robot is ready, the developer can make its code publicly available so that other owners of their own robots can hold their own competitions.

In this way we can determine the Champion robot and we will congratulate its creator on the victory.
Reply
(translated by Google translator)

Hi all.  Shy
I don't know what projects you are currently doing in Small Basic, but it's my turn to work on neural networks again.  Cool
However, this will not be using the ANN extension.
In order to easily and correctly use the ANN extension, I will first make a demo program that will allow us to visually observe how the neural network is trained.
I hope that when we see all this, then we will be able to understand it all well.
And when we understand all this well, then we will easily be able to use ANN neural networks in our SB projects.

( because if things continue like this, then my cyber sportsmen in the games "AI Snake" and "Retro Football" will become champions of the SB Championship this year, without even meeting a single opponent )
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)