gametechmods
Robot Arena => Modifications => Topic started by: apanx on July 24, 2009, 12:18:25 PM
-
(http://img512.imageshack.us/img512/4118/screenshot48.png) (http://www.youtube.com/watch?v=Ks9tEkyqpus)
http://www.youtube.com/watch?v=Ks9tEkyqpus
How is such a thing possible?(https://gametechmods.com/uploads/images/10129HISATP.png)
-
Nice bot.
-
(: HOW IS SUCH A THING POSSIBLE?!
-
ha wow that is pretty cool. I'm guessing in the py
-
How is such a thing possible :O Wow that is really cool. I'll see if I can find the smiley. If not I could try and make one, I used to make pixel art when I was a kid.
EDIT: I found the smiley, but its massive and has a watermark. I'm going to fix that soon, but here it is.
(https://gametechmods.com/uploads/images/77337howissuchathingpossible.PNG)
EDIT AGAIN: Here's the custom smily, 100% homemade in MS Paint and Gimp.
(https://gametechmods.com/uploads/images/354howissuchathingpossible.jpg)
I can make it smaller if it needs to be.
-
"There will be no more free will, only MY will"
-
Big-OHH
-
You have that arena. Can I have it.
-
That's a really sweet idea apanx. I never thought of dynamic arena GMF reloading.
-
Very Cool. This has been done, Apanx. Changing arenas, adding arenas, no arena (just changing floor panels on a 4x4 'Matrix').
-P_M_2 (http://www.madiaba.gametechmods.com/VIDS/P_M_2.wmv)(check out the 'Matrix Master' when you get stuck[if eyes could kill])
-Arena_inside_Arena (http://www.madiaba.gametechmods.com/VIDS/Arena_inside_Arena.wmv)-
-(-a whole thread of mods (https://gametechmods.com/forums/showthread.php?t=841)-)
Nice to see you diving in...
There is some coding for the BotLab garage that Trov and I've been working on that I'd like to show you for feedback, if you've time... Thanks for the recent feedback too.
BTW:
Thanks for your contribution to this game.
You too Serge.
BTW2:
None of us here has figured out 'raw_input' (keyboard) yet. ANY input there would be VERY appreciated.
-repost-
-
None of us here has figured out 'raw_input' (keyboard) yet. ANY input there would be VERY appreciated.
-repost-
i really can't figure no more yet : i've tried the classic "import msvcrt / ch = msvcrt.getch()" that gives nothing.
then i've tried to read the input port "import serial"
all crash the game.
-
Why raw-input will take time to implement.
Robot Arena 2, as many other games, uses DirectX to handle most game functions. This includes the game controller input, which is handled by the DirectInput part. As there does not seem to be any easy way to access this part via the C++ commands avaliable from Python. The only alternative that remains is to hook the DirectInput via Python which is possible, but difficult.
Another video for you all to watch. This time it is an AIed Full Body Spinner. Using ordinary SpinMotors for direction control. No servoes, no extra hassle.
(https://gametechmods.com/uploads/images/58491screenshot_49.PNG) (http://www.youtube.com/watch?v=O_WuWxBnZQI)
http://www.youtube.com/watch?v=O_WuWxBnZQI
How is such a thing possible?(https://gametechmods.com/uploads/images/10129HISATP.png)
-
I had several ideas for the keyboard (raw input) for some arena tweeks; but since it seems to be such a burden, it may not be worth it. Just picking brains, checking for any insights you might have... Thanks anyway.
Nice FBS.
-
AHA! The inner drive is using spin, it works normally..
-
Is that an AI?!?!?
-
Wow, doesn't even need power....
-
AHA! The inner drive is using spin, it works normally..
Wrong Answer
-
Bah!
lemmie test some stuff...
-
I got it!
You have the normal controls but Spin makes the inner wheels spin in a direction, LeftRight does the same. Forwards controls the outer Zteks, but only uses the forwards part. meaning that when the bot faces "forwards", it charges a little, Combine this with an AI and a fast SnS* and you get a fully mobile bot.
Pics of driving system up soon.
(http://i230.photobucket.com/albums/ee185/ninteen45/screenshot_16-2.jpg)
(http://i230.photobucket.com/albums/ee185/ninteen45/screenshot_17-1.jpg)
The "Spin" command.
(http://i230.photobucket.com/albums/ee185/ninteen45/screenshot_18-1.jpg)
The "Forward" wheels.
(http://i230.photobucket.com/albums/ee185/ninteen45/screenshot_19-1.jpg)
"LeftRight" does the same thing as spin.
-
But then there is this problem, how to do it with only two spinmotors.
(https://gametechmods.com/uploads/images/99883screenshot_51.PNG) (http://www.youtube.com/watch?v=iD-1cgWSv0c)
http://www.youtube.com/watch?v=iD-1cgWSv0c
How is such a thing possible?(https://gametechmods.com/uploads/images/10129HISATP.png)
-
Ah HA!I see some of those cheap batteries that are 100 lbs and are small and green and virtually never runs out! Or are those the atom batteries.
-
Yay! Melty Brain!
But can you do the same for a bot like this?
(https://gametechmods.com/uploads/images/92807melty.PNG)
-
Told you guys. Apanx, is a coding wiz..
I'm not holding my breath till you get it, for sure...
Thanks, Phil. I'll get back.
-
I missed this so much. Its mind boggling, it really is.
-
Well I see 2 cold fusion reactors inside the robot.
The preview was probably the second pink battery picture in the screenshot.
-
Well, this thread isn't about the parts. It's about the wiring and the AI.
I got the first FBS, but I couldn't get the 2WD one. Big-OHH
-
I can only assume it functions similarly to the real world thwack bots with navigation while spinning assuming there's no trickery involved.
The basic idea in that system, which is now generally referred to as the melty brain system, uses a reference point and a control telling the robot which direction to move in relation to that point. The motor controller pulses the motor(s) in such a way that it navigates the arena while maintaining its rotational speed.
RA2 may actually make it somewhat more simple as the AI can simply have the FBS navigate toward the opponent.
Of course there may be some other form of coding wizardry I'm not thinking of, but this is how it's done on most real thwack bots that are capable of navigating while spinning.
-
Another video for you all to watch. This time it is an AIed Full Body Spinner. Using ordinary SpinMotors for direction control. No servoes, no extra hassle.
Very nice AI!
i notice in my 'to do' backlog that i've tried to make such a thing : challenging !
-
One-Wheeled FBS works too.
(https://gametechmods.com/uploads/images/63839screenshot_54.PNG) (http://www.youtube.com/watch?v=y9hcTAOSZGA)
http://www.youtube.com/watch?v=y9hcTAOSZGA
How is such a thing possible?(https://gametechmods.com/uploads/images/10129HISATP.png)
Yes it is a melty brain control system implemented in AI, but there is another tweak too.
-
Big-OHH
Ok, now you lost me. :O
-
It still follows red's design. But I guess you have an AI for it, no?
-
How can you jack ass'in make it turn!?
-
Big-OHH
Ok, now you lost me. :O
Read over my description, it's like that with another piece added into the AI.
-
NICE work apanx!
I've been planning on trying this very concept since I found out about plus.Arena.__setattr__tickInterval__(), but it looks like you beat me to it. How low do you have the tick interval set? How fast can an AI spin before it starts to outpace the ticks? Could you AI something like, say, *shudder* Somebody's Super SnS with a melty brain?
Another cool thing you can do by decreasing the tick interval: measure the RPM of spinners, and make an AI that doesn't attack the opponent until its weapons reach a certain speed.
The Insanity Arena is a nice piece of work too. I knew about the CreateArenaByName function, but I never thought about throwing the bots in the air just before switching in order to keep them from falling through the floor. Genius.
Perhaps you need just a tad less force, though, since that one bot still got thrown out.
-
Maybe you could throw them towards the center of the arena?
-
Great idea, editting the tick interval. I never really found a use for the coding to change it until now... In fact, until I read Click's post, I was going to ask you how you got your debug window to update itself so much... I've been meaning to make a similar SnS AI but I'm amazed at how well you got it to work.
The Insanity Arena is cool but I have a couple arenas that change during the fight (none of which I thought of using the force command for even though I had the Matrix Arena).
-
NICE work apanx!
I've been planning on trying this very concept since I found out about plus.Arena.__setattr__tickInterval__(), but it looks like you beat me to it. How low do you have the tick interval set? How fast can an AI spin before it starts to outpace the ticks? Could you AI something like, say, *shudder* Somebody's Super SnS with a melty brain?
Another cool thing you can do by decreasing the tick interval: measure the RPM of spinners, and make an AI that doesn't attack the opponent until its weapons reach a certain speed.
The Insanity Arena is a nice piece of work too. I knew about the CreateArenaByName function, but I never thought about throwing the bots in the air just before switching in order to keep them from falling through the floor. Genius.
Perhaps you need just a tad less force, though, since that one bot still got thrown out.
The tickInterval is set individually for each AI spawned. Standard for AI is 0.125s. The tickInterval for the Arena only applies for the Arena mechanics, (hazards and stuff), standard 0.250s. tickInterval for the bot in the video is set at 0.001s. I have tried 0.0001, but that overtaxes the CPU and makes the game run slow.
Assuming that you need an accuracy of 0.1 radians (0.314degrees), which is what is specified for the AimToHeading command, you can have a rotation speed of 100 radians/sec which is little bit short of 1000rpm. Now that does not sound much, but this is RA2 and not real-life. The bot in the first video, (5uCKi n00b) with all its Zteks only reaches a speed of 20radians/sec. Slack off with the accuracy and the RPM limit increases.
The code is flexible enough to handle all plain FBS configs. However, there is no real pathfinding incorporated, it just goes straight towards the enemy without regard for own safety. Have to adapt the DriveToWaypoint code for it so it knows how to avoid things like traps.
-
1000 RPM is pretty good. Definitely enough for any stock bot. DSL? Somebody would probably have to try it.
So you have custom navigation on this AI? Would it be possible to just have the AI stop spinning for one tick whenever its heading faces toward the opponent, during which time it would do normal navigation? So if there was an obstacle in the way of the AI, it would try to steer, and therefore not move before it started spinning again. And if the path was clear, it would incrementally inch forward while spinning.
That was my original idea, but I haven't tested it. The theory seems sound. It wouldn't drive around hazards, of course, but staying in one place is better than committing suicide on a flipper.
Here's another thought for all of you: Bumble Bee with a melty brain.
-
# spin up depending on enemy's range
enemy, range = self.GetNearestEnemy()
self.Turn(100)
self.Throttle(0)
if enemy is not None:
self.DebugString(6, str(self.GetHeading(False)))
target = plus.getLocation(enemy)
h = self.GetHeadingTo(target, False)
if self.GetTurning() > 6:
if (abs(h) < 0.3 ):
self.Turn(0)
self.Throttle(100)
self.DebugString(8, "Boost")
if (abs(h) > 2.8 ):
self.Turn(0)
self.Throttle(-100)
self.DebugString(8, "Anti-Boost")
self.DebugString(7, str(h))
self.DebugString(8, "No Boost")
Well that is what you see right now. Moves a little bit tacky, but it will get better when I have polished it. One thing with FBS is that you dont have to orient them, so you can change direction instantly and have strafing bots.
-
Ah, so you have the AI pulse forward when it's facing the opponent, and pulse backward when it's facing away. That coding is surprisingly simple. So my method would move forward at half speed, but could work. Might be worth sacrificing speed for hazard avoidance...
Strafing bots would still be hard to do, I think, and probably not very useful because melty brain FBS's tend to move slowly. But it would be a cool novelty AI.
-
if (abs(h) < 0.3 ):
self.Turn(0)
self.Throttle(100)
self.DebugString(8, "Boost")
if (abs(h) > 2.8 ):
self.Turn(0)
self.Throttle(-100)
self.DebugString(8, "Anti-Boost")
Couple thoughts:
1. Would be nice to move the abs. heading range (0.6 in this case) over into the Bindings line, and make it tweekable, for different apps/bots..
2. Should this 'radian parameter' be moved from 'center' (0 and 3.14) to start a bit sooner for perhaps straighter driving?
3. Navigation: Moving this parameter's 'center' might be a good way of 'steering while spinning'...left or right; to both avoiding detected hazards, walls and such, and possibly facilitate better steering toward enemy.
.
-
Although it might be easier to adapt Click's original idea so that it can move around hazards, if the AI wants to turn right but the bot is still spinning left, wouldn't it just slow down before going back to spinning.
Wouldn't it be better if you made regulated the RPM of motors so that the motors going in the right direction are going faster than the motors going in the wrong direction? Then to avoid hazards, you could adapt the DriveToWaypoints coding (like you suggested earlier). You could also program it to inch toward the opponent slower as the distance between the bots lessens so that it hits them with more force (Ex. while at 5 units away, the left side is moving at 80 while the right side is moving at 100 vs. while at 3 units away, the left side is moving at 90 while the right side is moving at 100). The force driving the bot forward would be less but the force spinning the bot would be more. Then it would still move toward the opponent, have roughly the same amount of force as if it wasn't, and get slightly more solid hits in (instead of scratches) because it is still inching closer. You could also tell it to check for hits using self.GetLastDamageDone() and if the opponent isn't recieving enough damage move closer or spin more depending on something user defined (Time between hits? Amount of damage?).
Another idea would be to make the AI hit the opponent with a certain weapon arm depending on the HP and speed of both bots toward eachother but thats probably pushing fairness.
-
Om my, lots of thought to consider.
Well, one thing with this kind of bots is that some usual conventions that apply for normal bots are not appliable. Mobility for a normal bot consists of moving backwards, forwards and turning. For this kind of FBS, that does not apply. It does not move 'Forward' or Backward' as it is constantly spinning, changing what Forward and Backward is in relation to it.
A FBS can change the direction it is heading virtually instant. It does not need to slow down in order to change heading.
If you want a normal bot to change its course by 90degrees, because there is a hole up ahead, it would have to slow down, turn and then speed up. A FBS would just change its direction, keeping the same speed.
If someone have played this game Flying Saucer, a FBS' movment control would be like the control of the saucer. You point where you want to go and how fast and it instantly goes in that direction.
The modding of DriveToLocation(actually DriveToWaypoint) would consist of removing the AimToHeading command and adapting the speed control part for use with the FBS.
Flexible stuff is always good. The accuracy will be adjustable in the release version of this code. This is merely a proof-of-concept hack thrown together in order to produce the video. All that is needed for the bot to move "smartly"
give it the locations it should move to and plug them into GetHeadingTo, returning the current heading to that navigational code.
A future development for this code is to detach itself from the Turn and Forward controllers and instead control each side seperately. In this way there can be more than one axis of symmetry for FBS, and three-wheeled FBS would be possible.
However, I now use another code for spinmotor control, giving the FBS higher translational capability.
Yet another Video
Have a look (http://www.youtube.com/watch?v=3sSgz70g0lA)
It is the same bot as before, but with this control scheme, it can move much faster.
-
i've did not see a link to download the AI, may you share it please ?
btw your insanity arena is craaazyy !
-
i know this is a bump but i would like the ai and here is another how is this possible fbs
http://www.youtube.com/watch?v=9ofJthTt7mY&feature=channel_page
work that one out
plz post a link to the ai
-
It has wheels and a spin motor?
-
no for the ai, i would also like the 2wd ai
-
i know this is a bump but i would like the ai and here is another how is this possible fbs
http://www.youtube.com/watch?v=9ofJthTt7mY&feature=channel_page
work that one out
plz post a link to the ai
You mean sometihng like this? (https://gametechmods.com/forums/showpost.php?p=54901&postcount=29)
FBS AI attached to this post, enjoy.
-
Just figured how that AI works, and it is very nice. The bot sit-and-spins much slower however, but i suppose it can't be helped...
I'll try to tweak my bindings more to increase spinup speed, like using 'spinspeed'... i think it will decrease translation speed, but i think it's worth it.
What is 'accuracy' exactly ?
-
turnFactor = ((h - self.accuracy) * (h - (math.pi - self.accuracy) ) / self.rampupfactor)
Is not that obvious ;)
It is the window in radians where the bot moves forward or backwards. So if you have higher value the bot will be less accurate when tracking the enemy. Lower value vill make more likely for the bot to face the enemy before moving forward or backward, making it more accurate.
-
You mean sometihng like this? (https://gametechmods.com/forums/showpost.php?p=54901&postcount=29)
FBS AI attached to this post, enjoy.
yay thanks!
i have been looking for that ai for months!(ive tried to make it but with no success.)
edit:so what do u put as the bindings and the controls?