Now have the ability to do partial solutions that will create potential paths to the goal, and a test that runs the scripts from plans in different scenarios. Also, this ai_debug thing needs some work.

This commit is contained in:
Zed A. Shaw 2025-03-11 15:33:14 -04:00
parent 3f83d3f0bb
commit fc66d221d4
11 changed files with 252 additions and 107 deletions

View file

@ -1,85 +1,81 @@
{
"profile": {
"target_acquired": 0,
"target_lost": 1,
"target_in_warhead_range": 2,
"target_dead": 3
"enemy_found": 0,
"enemy_dead": 1,
"health_good": 2,
"no_more_items": 3,
"no_more_enemies": 4
},
"actions": [
{
"name": "searchSpiral",
"cost": 10,
"name": "find_enemy",
"cost": 5,
"needs": {
"target_acquired": false,
"target_lost": true
"no_more_enemies": false,
"health_good": true,
"enemy_found": false
},
"effects": {
"target_acquired": true
"enemy_found": true
}
},
{
"name": "searchSerpentine",
"name": "kill_enemy",
"cost": 5,
"needs": {
"target_acquired": false,
"target_lost": false
"no_more_enemies": false,
"enemy_found": true,
"health_good": true,
"enemy_dead": false
},
"effects": {
"target_acquired": true
"enemy_dead": true
}
},
{
"name": "searchSpiral",
"name": "collect_items",
"cost": 5,
"needs": {
"target_acquired": false,
"target_lost": true
"no_more_enemies": true,
"no_more_items": false
},
"effects": {
"target_acquired": true
"no_more_items": true
}
},
{
"name": "interceptTarget",
"name": "find_healing",
"cost": 5,
"needs": {
"target_acquired": true,
"target_dead": false
"health_good": false,
"no_more_items": false
},
"effects": {
"target_in_warhead_range": true
}
},
{
"name": "detonateNearTarget",
"cost": 5,
"needs": {
"target_in_warhead_range": true,
"target_acquired": true,
"target_dead": false
},
"effects": {
"target_dead": true
"health_good": true
}
}
],
"states": {
"test_start": {
"target_acquired": false,
"target_lost": true,
"target_in_warhead_range": false,
"target_dead": false
"Walker::initial_state": {
"enemy_found": false,
"enemy_dead": false,
"health_good": true,
"no_more_items": false,
"no_more_enemies": false
},
"test_goal": {
"target_dead": true
"Walker::final_state": {
"enemy_found": true,
"enemy_dead": true,
"health_good": true,
"no_more_items": true,
"no_more_enemies": true
}
},
"scripts": {
"test1": [
"searchSpiral",
"searchSerpentine",
"searchSpiral",
"interceptTarget",
"detonateNearTarget"]
"Walker::actions":
["find_enemy",
"kill_enemy",
"find_healing",
"collect_items"]
}
}