Ludii Forum
Throngs Graphics update - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Submit Your Games (https://ludii.games/forums/forumdisplay.php?fid=23)
+--- Thread: Throngs Graphics update (/showthread.php?tid=567)



Throngs Graphics update - dale walton - 05-17-2021

For some reason the current Throngs version on the site is missing  (no sunken), and thus displaying very poorly.

Please update add that line to the graphics meta data.


RE: Throngs Graphics update - Eric Piette - 05-17-2021

Hi,

Sure with pleasure!

Regards,
Eric


RE: Throngs Graphics update - dale walton - 05-26-2021

Hi, I re-scripted Throngs to process a move by 1) select a location then 2) calculate and remember all the possible destinations 3) move again to select the destination.
(and repeat for the second move in a turn.

The AI works a little better  (and faster since it doesn't make many silly steps during a turn)

The script expands to around 30,000 lines so selecting game options is slow, but otherwise is fast enough. I was getting near the 1000 define expansion limit!

Too bad you don't have a (sites Distance ... ) where the moves can be hops instead of simple steps...

One bug on your side:
When I run this  with the pie option, the dialog for selecting the  "Propose" move doesn't appear, so the game cannot proceed. -- However the AI is able to do the propose selection, so it appears to be a problem in not offering it to the human interface.


RE: Throngs Graphics update - Eric Piette - 05-27-2021

Hi,

Ok, I asked Matthew to take a look at the GUI to check for the purpose moves to play (humanly), that was effectively something we missed in the code, Matthew fixed it.

I am going to update this game with your new description.

Regards,
Eric


RE: Throngs Graphics update - dale walton - 05-27-2021

Thanks.  It also was occasionally throwing exceptions to the java terminal when there were a lot of choices and the AI was set to 1 second, but it didn't seem to affect play and was not frequent.  If you notice it take a look at the cause.

I just did a run with an exception at the beginning:

Compiled Throngs successfully.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.desktop/javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:576)
at java.desktop/javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:489)
at java.desktop/javax.swing.text.FlowView.layout(FlowView.java:209)
at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
at java.desktop/javax.swing.text.BoxView.updateChildSizes(BoxView.java:367)
at java.desktop/javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:335)
at java.desktop/javax.swing.text.BoxView.layout(BoxView.java:710)
at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
at java.desktop/javax.swing.text.BoxView.updateChildSizes(BoxView.java:367)
at java.desktop/javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:335)
at java.desktop/javax.swing.text.BoxView.layout(BoxView.java:710)
at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
at java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1818)
at java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:948)
at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
at java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
at java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
at java.desktop/java.awt.Container.layout(Container.java:1537)
at java.desktop/java.awt.Container.doLayout(Container.java:1526)
at java.desktop/java.awt.Container.validateTree(Container.java:1722)
at java.desktop/java.awt.Container.validateTree(Container.java:1731)
at java.desktop/java.awt.Container.validateTree(Container.java:1731)
at java.desktop/java.awt.Container.validateTree(Container.java:1731)
at java.desktop/java.awt.Container.validate(Container.java:1657)
at java.desktop/javax.swing.RepaintManager$3.run(RepaintManager.java:745)
at java.desktop/javax.swing.RepaintManager$3.run(RepaintManager.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:742)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1889)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

and very near the end:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.desktop/javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:581)
at java.desktop/javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:489)
at java.desktop/javax.swing.text.FlowView.layout(FlowView.java:209)
at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
at java.desktop/javax.swing.text.BoxView.updateChildSizes(BoxView.java:367)
at java.desktop/javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:349)
at java.desktop/javax.swing.text.BoxView.layout(BoxView.java:709)
at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
at java.desktop/javax.swing.text.BoxView.updateChildSizes(BoxView.java:367)
at java.desktop/javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:349)
at java.desktop/javax.swing.text.BoxView.layout(BoxView.java:709)
at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
at java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1818)
at java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:948)
at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
at java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
at java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
at java.desktop/java.awt.Container.layout(Container.java:1537)
at java.desktop/java.awt.Container.doLayout(Container.java:1526)
at java.desktop/java.awt.Container.validateTree(Container.java:1722)
at java.desktop/java.awt.Container.validate(Container.java:1657)
at java.desktop/javax.swing.JViewport.validateView(JViewport.java:492)
at java.desktop/javax.swing.JViewport.scrollRectToVisible(JViewport.java:403)
at java.desktop/javax.swing.JComponent.scrollRectToVisible(JComponent.java:3133)
at java.desktop/javax.swing.text.DefaultCaret.adjustVisibility(DefaultCaret.java:286)
at java.desktop/javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:1323)
at java.desktop/javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:1296)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
javax.swing.text.BadLocationException: Invalid insert
at java.desktop/javax.swing.text.GapContent.insertString(GapContent.java:137)
at java.desktop/javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:732)
at java.desktop/javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:716)
at app.display.views.tabs.TabPage.addText(TabPage.java:269)
at app.display.views.tabs.pages.MovesPage.updatePage(MovesPage.java:48)
at app.display.views.tabs.TabView.updateTabs(TabView.java:216)
at app.DesktopApp.updateTabs(DesktopApp.java:915)
at app.PlayerApp.postMoveGUIUpdates(PlayerApp.java:334)
at manager.Referee.postMoveApplication(Referee.java:740)
at manager.Referee$6.call(Referee.java:580)
at other.model.AlternatingMove$1.run(AlternatingMove.java:414)
at other.ThinkingThread$ThinkingThreadRunnable.run(ThinkingThread.java:212)
at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

Play appeared to be unaffected.

Ran again and saved the trial. exceptions arround move 47, 53 and 54 or 55.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
javax.swing.text.BadLocationException: Invalid insert
at java.desktop/javax.swing.text.GapContent.insertString(GapContent.java:137)
at java.desktop/javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:732)
at java.desktop/javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:716)
at app.display.views.tabs.TabPage.addText(TabPage.java:269)
at app.display.views.tabs.pages.MovesPage.updatePage(MovesPage.java:48)
at app.display.views.tabs.TabView.updateTabs(TabView.java:216)
at app.DesktopApp.updateTabs(DesktopApp.java:915)
at app.PlayerApp.postMoveGUIUpdates(PlayerApp.java:334)
at manager.Referee.postMoveApplication(Referee.java:740)
at manager.Referee$6.call(Referee.java:580)
at other.model.AlternatingMove$1.run(AlternatingMove.java:414)
at other.ThinkingThread$ThinkingThreadRunnable.run(ThinkingThread.java:212)
at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException


RE: Throngs Graphics update - dale walton - 05-28-2021

Re the propose bug. - It now works better, saying "you may propose" but when I click on the 3 dot symbol to propose It says "that is not a valid move" at the same time as the selection is shown. Cancelling and then repeating the action does not show this message, but if the pie turn is revoked an played again, the warning occurs again. The warning does time itself out and does not prevent selection of the proposal, so it is more of a cosmetic issue.


RE: Throngs Graphics update - MatthewStephenson - 05-31-2021

Hi,

Thanks for pointing this out, I'll try and get it fixed for the next release.

Cheers,
Matthew