Robot Arena > Tutorials and Tips

AI-ing (.py files, coding, nose-orienting R+D, and help)

(1/265) > >>

Madiaba:
This thread is to help facilitate modders/builders to learn how to AI. It's fairly easy if one will just invest some time, so no 'cold feet' necessary.
 
There's been an 'AI Chart' that I started and then sent to CB, and is now with SC, (but he's been busy, NP). I'll finish up his part and send it to Goose for any other final tweaks before it goes out. It will be a simple chart of all available AI.pys kinds (Spinner, Rammer,...); their function(s); bot wiring's zone/control naming.
ANY noob can learn and do it in a short time.
Bindings line functions and tweaking, questions or input, are welcome here too.
(BTW: No inquiries or input is too easy or dumb....)
--------------------------
 
 
So to start:
Here's a new FBS AI.py that I just finished. FBS's are notorious for getting counted out while spinning. This py is very reliable to 'stop and move' when the immobilization countdown starts. It has other User-adjustable settings that you can read about for yourself in the ReadMe included. Stock and DSL.
 
FBS_1]FBS_1
 
[/color]..[/b][/URL]
 
 
 
 
 
                             Bindings.py
-Bot Nose orientaton:
(Copy+paste this coding to the top of your Bindings.py for a convenient reference)
How to use:
1. Find out where your bot is facing in-game (Exhibition), without any nose bias.
2. Then use this chart to turn it to face forward, NP.
 
 
--- Code: ---    # nose is "front" of bot-
        #Nose paradigm: All 360 rotational degrees for "math.pi" are represented by the factor '2'.
            #thus:  '2'=360degrees,   '1'=180degrees,   '0.5'=90degrees,   '0.25'=45degrees.
        #The direction of change(CW/CCW)is determined by the "-" or "+" before the statement.
            #thus: '+' causes rotation CCW,  '-' causes rotation CW.
        #Format examples:
            # " 'nose':math.pi*0.25 "  will rotate the bot 45degrees/CCW.
            # " 'nose':-math.pi*0.25 " will rotate the bot 45degrees/CW.
            # " 'nose':math.pi*0.5 "   will rotate the bot 90degrees/CCW.
            # " 'nose':-math.pi*0.5 "  will rotate the bot 90degrees/CW.
            # " 'nose':math.pi*0.75 "  will rotate the bot 135degrees/CCW.
            # " 'nose':-math.pi*0.75 " will rotate the bot 135degrees/CW.
            # (Make sure there is a comma(,)after the the value # (to separate it from the next characteristic and its value).
            #(-----notes-----)
                # Note1:  "math.pi"   AND   'nose':math.pi*1.0 "   AND  " 'nose': -math.pi*1.0 "   will rotate the bot 180 degrees.
                    #   (The first two are the same, and the last two just rotate different directions to get 180 degrees.}
                    #   Thus there is no real reason to have a factor greater than '1',
                    #   since after that you just move into the other half of the circle covered by the other '+' or '-' sign.
                # Note2: "math.pi*0" or "math.pi*2" = the same as no new heading.


--- End code ---

 
Again, you might copy this to the top of your Bindings.py for easy reference.

Naryar:
Starcore done something like that already... and posted it somewhere, with the strengths/weaknesses of all AI's, and it's great.

Anyways this would be welcomed Mad. My ELBITE tabletop bot is decently AIed, but i'm still a beginner (i don't suck at it anymore at least)

Madiaba:
I've not seen and he's not told me of a chart like this; unless he put up the incomplete version?.. which I doubt. This is not a step 1,2,3... on "How to AI" instructions, like on GTM. It's a chart on the necessary AI.py information for choosing the best/appropriate AI.py based upon functioning(s), and then the some information/specs needed to AI it.
I'll put up a snipet later ....
But if you run into it, please let me know...

infiniteinertia:
This is great for me, because I would like to try and make my own "Relentless.py" and well, at least try...

Gigafrost:
Woah, that FBS .py is simular to my RA2GE version for the bot Filmore. Anyway, nice tut.

Navigation

[0] Message Index

[#] Next page

Go to full version