-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVBAF.Public.Get-Examples.ps1
More file actions
161 lines (138 loc) · 5.65 KB
/
VBAF.Public.Get-Examples.ps1
File metadata and controls
161 lines (138 loc) · 5.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
function Get-VBAFExamples {
<#
.SYNOPSIS
Lists available VBAF examples and how to run them.
.DESCRIPTION
Displays all available example scripts with descriptions and usage instructions.
Examples demonstrate neural networks, Q-learning, multi-agent systems, and more.
.PARAMETER Category
Filter examples by category.
Valid values: 'Core', 'RL', 'Business', 'Art', 'Visualization', 'All'
Default: 'All'
.PARAMETER ShowPath
Display full file paths to examples.
.EXAMPLE
Get-VBAFExamples
Lists all available examples.
.EXAMPLE
Get-VBAFExamples -Category RL
Shows only reinforcement learning examples.
.EXAMPLE
Get-VBAFExamples -ShowPath
Displays file paths to examples.
.OUTPUTS
List of available examples with descriptions.
.NOTES
Author: Henning
Part of VBAF Module
#>
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[ValidateSet('Core', 'RL', 'Business', 'Art', 'Visualization', 'All')]
[string]$Category = 'All',
[Parameter(Mandatory = $false)]
[switch]$ShowPath
)
Write-Host "`n - oo00oo - " -ForegroundColor Yellow
Write-Host " VBAF Examples" -ForegroundColor Cyan
Write-Host " - oo00oo - `n" -ForegroundColor Yellow
# Define all examples
$examples = @(
[PSCustomObject]@{
Category = 'Core'
Name = 'XOR Neural Network'
File = 'VBAF.Core.Example-XOR.ps1'
Description = 'Train a neural network to solve the XOR problem'
Command = '. $basePath\VBAF.Core.Example-XOR.ps1'
},
[PSCustomObject]@{
Category = 'Core'
Name = 'Validation Dashboard'
File = 'VBAF.Core.Test-ValidationDashboard.ps1'
Description = 'Visual proof that neural networks and Q-learning work'
Command = '. $basePath\VBAF.Core.Test-ValidationDashboard.ps1'
},
[PSCustomObject]@{
Category = 'RL'
Name = 'Castle Q-Learning'
File = 'VBAF.RL.Example-CastleLearning.ps1'
Description = 'RL agent learns to generate aesthetic castle sequences'
Command = '. $basePath\VBAF.RL.Example-CastleLearning.ps1'
},
[PSCustomObject]@{
Category = 'RL'
Name = 'Q-Learning Grid World'
File = 'VBAF.RL.Example-GridWorld.ps1'
Description = 'Simple Q-learning in 10x10 grid environment'
Command = '. $basePath\VBAF.RL.Example-GridWorld.ps1'
},
[PSCustomObject]@{
Category = 'Business'
Name = 'Company Learning Test'
File = 'VBAF.Company.TestLearning.ps1'
Description = 'Single company agent learns optimal strategy'
Command = '. $basePath\VBAF.Company.TestLearning.ps1'
},
[PSCustomObject]@{
Category = 'Business'
Name = 'Multi-Company Market'
File = 'VBAF.Business.Test.CompanyMarket.ps1'
Description = '4 companies compete in simulated market'
Command = '. $basePath\VBAF.Business.Test.CompanyMarket.ps1'
},
[PSCustomObject]@{
Category = 'Business'
Name = 'Market Dashboard Demo'
File = 'VBAF.Business.Dashboard-Demo.ps1'
Description = 'Real-time visualization of market simulation'
Command = '. $basePath\VBAF.Business.Dashboard-Demo.ps1'
},
[PSCustomObject]@{
Category = 'Art'
Name = 'Castle Competition'
File = 'VBAF.Art.CastleCompetition.ps1'
Description = '3 agents compete for aesthetic space - GRAND FINALE!'
Command = '. $basePath\VBAF.Art.CastleCompetition.ps1'
},
[PSCustomObject]@{
Category = 'Art'
Name = 'Show20 Q-Learning Agent'
File = 'VBAF.Art.Show20-QLearning.ps1'
Description = 'Original castle generation with Q-learning'
Command = '. $basePath\VBAF.Art.Show20-QLearning.ps1'
},
[PSCustomObject]@{
Category = 'Visualization'
Name = 'Learning Dashboard'
File = 'VBAF.Visualization.Example-Dashboard.ps1'
Description = 'Real-time learning curve visualization'
Command = '. $basePath\VBAF.Visualization.Example-Dashboard.ps1'
}
)
# Filter by category
if ($Category -ne 'All') {
$examples = $examples | Where-Object { $_.Category -eq $Category }
}
# Group by category
$grouped = $examples | Group-Object Category
foreach ($group in $grouped) {
Write-Host " [$($group.Name)]" -ForegroundColor Green
Write-Host " " + ("=" * 70) -ForegroundColor DarkGray
foreach ($example in $group.Group) {
Write-Host " • " -NoNewline -ForegroundColor Cyan
Write-Host $example.Name -ForegroundColor White
Write-Host " $($example.Description)" -ForegroundColor Gray
if ($ShowPath) {
Write-Host " File: $($example.File)" -ForegroundColor DarkGray
}
Write-Host " Run: " -NoNewline -ForegroundColor Yellow
Write-Host $example.Command -ForegroundColor White
Write-Host ""
}
}
Write-Host " Total Examples: $($examples.Count)" -ForegroundColor Cyan
Write-Host "`n - oo00oo - `n" -ForegroundColor Yellow
# Return examples for pipeline use
return $examples
}