Author Topic: How the...  (Read 6729 times)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2374
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: How the...
« Reply #15 on: November 19, 2014, 09:56:21 pm »
.... and forsaken children are hard to come by these days.

Ah hah!  I sense a business opportunity here!  Where there is a shortage of something, there must be a demand!  Quick lets go corner the market on forsaken children and make a Million Dollars!

<Evil Chuckle>

Offline mrxian

  • Colonel
  • ****
  • Posts: 109
    • View Profile
Re: How the...
« Reply #16 on: April 18, 2015, 11:54:40 pm »
unfortunately i can't inject a human brain into the AI. it will never be capable of creative thinking like that.
What if we take a really, really stupid person who's not creative at all?

Offline darkestaxe

  • Colonel
  • ****
  • Posts: 256
  • Emissary of the Brain
    • View Profile
Re: How the...
« Reply #17 on: May 05, 2015, 12:00:50 am »
Well look what got necro'd. I just happen to have found some leftovers in a can. Not sure if they'll be useful, I don't think any of it's still alive or anything.

I scraped this out of one can:

Code: [Select]
https:/// **** ORPHAN PARTS ****

AttackFurthestWeakTile(){
  https:// select all tiles that can be reached by current unit
  https:// select all non-pathable tiles adjacent to currently selected tiles, replacing current selection
  https:// order tiles from weakest to strongest
  https:// select the most distant tile that is as weak as the weakest
  https:// attempt to attack tile.
  https://      if attack fails, flag tile as non-reachable
  https://      if attack succeeds but does not destroy tile, continue attacking
  https://      if tile becomes path-able, attempt to resume normal pathing tactics
}

ClearLargerPathToDestination(destination){
https://note: before quitting: check whether targeted tiles can be destroyed by equipped weapons

  https:// Select 'groupA' all tiles along 1x1 path to destination
  https:// select 'groupB' all adjacent tiles to groupA that are non path-able, indexing to groupA tiles
  https:// select 'groupC' all tiles opposite GroupA tiles that are non-pathable from indexed GroupB tiles , indexing to groupA tiles
  https:// deselect all groupA tiles that are lacking an indexed groupB tile IF the next or previous tile also lacks a groupB tile
  https:// repeat with GroupC instead of groupB tiles
  https:// Loop through each groupB and groupC tile, flagging to pathable and attempting to path a 2x2 to destination.
  https:// if a success is made, attempt to destroy the offending tile and quit.
  https:// If destination was not reached and the total groupB and groupC tiles are less then 8, test all combinations of tiles
  https:// If any combination succedes, select the combination with the lowest number of tiles,
  https://    lowest maximum single tile strength, and lowest total strength of all tiles. Attempt to destroy them and then quit.
  https:// If the battle hasn't begun, flag spawn point as Jailed2x2 and quit.

https://Note2: 2x2 units should be placed in non-jailed spawn points before battle start, elsewhere in code.
}

I scraped this out of the other can:
« Last Edit: May 05, 2015, 12:06:03 am by darkestaxe »