Block Based AI Programming:
But why block based programming? Scripting is so much more versatile and gives the player much more control?
Well I would tend to agree, but after a discussion with Bench I learned that schema is trying to use as little metadata as possible because the amount of space for metadata is finite while the space allowed for blocks is theoretically unlimited. Scripting would be relegated to metadata, and therefore would limit a player to how much scripting would be possible. With this in mind I’ve come up with a way to allow for AI programming that only uses blocks and doesn’t use any metadata at all.
I believe the current logic system can be expanded and used to program AI functions and behaviors. But in order to do this I would like to add 9 new Logic blocks. Basically there are blocks added to detect Target Range, Mass, Faction, Shields, etc... that can be used in conjunction with existing logic blocks.
Also there is the concern of how much space these logic blocks will take up once your program is complete. How on earth will it fit in a drone? Well to this I say what about Resource-less, Mass-less, Invisible logic blocks? Or better yet I like Lukwan's idea:
So…. What do you guys/gals think?
But why block based programming? Scripting is so much more versatile and gives the player much more control?
Well I would tend to agree, but after a discussion with Bench I learned that schema is trying to use as little metadata as possible because the amount of space for metadata is finite while the space allowed for blocks is theoretically unlimited. Scripting would be relegated to metadata, and therefore would limit a player to how much scripting would be possible. With this in mind I’ve come up with a way to allow for AI programming that only uses blocks and doesn’t use any metadata at all.
I believe the current logic system can be expanded and used to program AI functions and behaviors. But in order to do this I would like to add 9 new Logic blocks. Basically there are blocks added to detect Target Range, Mass, Faction, Shields, etc... that can be used in conjunction with existing logic blocks.
The number of Activated Activator Blocks linked to a Control Block would determine the exact function the Control Block would perform. So for example lets take a Thrust Control Block from below. If you Link 7 Activation Blocks (There are 7 possible functions) to a Thrust Control Block, and 4 of those activation blocks are activated (#4 is Strafe Right). When you activate the Thrust Control Block the ship will strafe right as long as the Thrust Control Block is activated. When you deactivate the Thrust Control Block, then the ship will stop Strafing Right, and begin drifting. Then to bring the ship to a stop, simply deactivate all but one of the linked activation blocks (#1 is All Stop), and then activate the Thrust Control Block again to bring the ship to a stop. Simple right?
The Target Sensor Block should be used in conjunction with the new Sensor block. So take the Target Sensor Block and link it to 6 activation blocks and then turn 2 of them on (#2 is Shields). Now link a Sensor Block to the Target Sensor Block. Now the Sensor Block will return the percentage of your target’s shields. So if your sensor block had 10 activation blocks linked and 3 of them were activated. Then the sensor block would return true if your target’s Shields were above 30% or false if your target’s shields were below 30%.
The Mass and Range Readings would be special circumstances, and I’m not sure what would be the best way to return values. One idea would be that the Sensor block would go by the number of activated activation blocks linked. So for range: if the sensor block had 3 activated activation blocks linked then it would return true if your target was more than 1.5 sectors away.
Thrust Control
Target Filter Type
- All Stop: While active will apply the brakes
- Forward
- Reverse
- Strafe Right
- Strafe Left
- Ascend
- Descend
- All Stop
- Roll Clock Wise: while active will roll the ship clockwise
- Roll Counter Clock Wise
- Yaw Right
- Yaw Left
- Pitch Up
- Pitch Down
- Center on Target: while active will center the ship to the target.
- Center on Galactic North
- Activate Hot-Bar Item #1: while active it’s like pressing the first Hot-bar button.
- Activate Hot-Bar Item #2
- Etc...
- Target Next: when activated it changes your target to the next one.
- Target Previous
- Target Closest
- Target Furthest
- Transmit Current Target to Fleet
- Target Received Target
Target Filter Type
- Missile: While active will only target Missiles
- Astronaut
- Ship
- Turret
- Docked Entity
- Asteroid
- Station
- Shop
- Planet
- Planet Part
- Friendly: While Active will only target Friendly
- Hostile
- Neutral
- Own Faction
- Power: While Active will only target power systems within targeted structure.
- Power Battery
- Engines
- Shields
- Structure only
- Armor
- Target Power: Returns the % of target’s Power remaining
- Target Shield: Returns the % of target’s Shields remaining
- Target Structure: Returns the % of target’s Structure remaining
- Target Armor: Returns the % of target’s Armor remaining
- Target Mass: Returns the target’s Mass per 10K
- Target Range: Returns the target’s Range per half sector
The Mass and Range Readings would be special circumstances, and I’m not sure what would be the best way to return values. One idea would be that the Sensor block would go by the number of activated activation blocks linked. So for range: if the sensor block had 3 activated activation blocks linked then it would return true if your target was more than 1.5 sectors away.
Also there is the concern of how much space these logic blocks will take up once your program is complete. How on earth will it fit in a drone? Well to this I say what about Resource-less, Mass-less, Invisible logic blocks? Or better yet I like Lukwan's idea:
When replying in this thread please only respond to the Original Idea of this Post. Please don’t start arguing the merits of script based programming, that is not what this thread is about. What is being discussed is the best way to go about creating a block based method of programming AI drones and ships.This sounds like a great way to incorporate CyberSpace into SM. A non-physical reality that is, in this case, housed by a single physical block: AI programming block (or whatever). Within this virtual area you can lay out your block-based programming scheme where the blocks are holographic (exist in another dimension). The AI Cyberspace-block will work perfectly until it takes damage or is destroyed (small explosion?). To prevent abuse there can be block-limits, high power-consumption or catastrophic failure (like ship goes haywire for 30 seconds if block is destroyed).
So…. What do you guys/gals think?
Last edited: