49 lines
3.7 KiB
Python
49 lines
3.7 KiB
Python
import urllib.request, json, time
|
|
|
|
URL = 'http://127.0.0.1:28822/ask'
|
|
|
|
def ask(label, question):
|
|
print('=== ' + label + ' ===')
|
|
data = json.dumps({'question': question}).encode()
|
|
req = urllib.request.Request(URL, data=data,
|
|
headers={'Content-Type': 'application/json'}, method='POST')
|
|
try:
|
|
with urllib.request.urlopen(req, timeout=180) as r:
|
|
resp = json.loads(r.read())
|
|
answer = resp.get('response', '(empty)')
|
|
print(answer)
|
|
print()
|
|
return answer
|
|
except Exception as e:
|
|
print('ERROR: ' + str(e))
|
|
return ''
|
|
|
|
results = {}
|
|
|
|
results['Q1'] = ask('Q1 - What injection actually does',
|
|
'We are injecting taker_buy_usd and taker_sell_usd as opposing density blobs at columns 160 and 352 (x=400 and x=624 in a 512-wide grid). These are dollar volumes of aggressive buying and selling each minute. When these values are injected as density perturbations, what physical quantity are we actually creating in the field? Is dollar volume the right quantity to inject as density, or is it more naturally a pressure, a flux, or something else? What would happen differently if we injected trade_count instead of dollar volume?')
|
|
|
|
time.sleep(5)
|
|
|
|
results['Q2'] = ask('Q2 - Optimal injection geometry',
|
|
'The field is 512 columns wide representing price ticks. We currently inject buy pressure at column 160 and sell pressure at column 352 - symmetric around the centre at 256. These positions were chosen arbitrarily. What injection geometry would best allow the field to develop persistent spatial structure that reflects market state? Should buy and sell be separated spatially, or should they be injected at the same column with opposite signs? What column positions or geometry would allow the lattice physics to most naturally distinguish trending from ranging market states?')
|
|
|
|
time.sleep(5)
|
|
|
|
results['Q3'] = ask('Q3 - Are we injecting noise',
|
|
'In the 3-month replay, consolidation events fired at columns 128 and 384 in almost every minute regardless of market conditions. These columns correspond to the peaks of our synthetic exponential-decay book equilibrium, not to real market activity. The event detector appears to be finding its own book geometry rather than market structure. Is the injection of a synthetic book equilibrium itself the source of this noise? Would the field produce more meaningful patterns if we removed the synthetic book entirely and let the injected trades define the equilibrium directly from the market data?')
|
|
|
|
time.sleep(5)
|
|
|
|
results['Q4'] = ask('Q4 - Mechanism of lattice patterning',
|
|
'Explain the mechanism by which the BGK lattice creates persistent spatial patterns. When a density injection is made at column X, what happens over the next 10, 100, 1000 cycles? How does the BGK collision term create memory of past injections? At what point does a pattern become self-sustaining versus decaying back to equilibrium? What market data characteristics - frequency, magnitude, spatial distribution - would be most likely to create persistent patterns rather than being absorbed?')
|
|
|
|
time.sleep(5)
|
|
|
|
results['Q5'] = ask('Q5 - Simplest possible signal',
|
|
'Given everything you observe about how this lattice responds to market data injection, what is the simplest possible injection scheme that would give the lattice the best chance of developing meaningful spatial patterns that correlate with market outcomes? Forget the current architecture. If you were designing the injection from scratch with one or two variables maximum, what would you inject, where, and why?')
|
|
|
|
with open('/mnt/d/Resonance_Engine/traj/fractonaut_investigation_answers.json', 'w') as f:
|
|
json.dump(results, f, indent=2)
|
|
print('Saved to fractonaut_investigation_answers.json')
|