Beginnings of the AILogic javascript
updating AILogic